Skip to content

Commit 68ca288

Browse files
Update com.unity.netcode.gameobjects/Runtime/Serialization/FastBufferReader.cs
Co-authored-by: Emma <emma.mcmillan@unity3d.com>
1 parent 0db2eb6 commit 68ca288

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

com.unity.netcode.gameobjects/Runtime/Serialization/FastBufferReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ private int ValidateStringByteCount(int length, bool oneByteChars)
580580
var readSize = oneByteChars ? length : length * sizeof(char);
581581
if (int.MaxValue < (uint)readSize)
582582
{
583-
throw new OverflowException($"Invalid reader position detected when trying to read a string of size {(uint)readSize}! This can result from reading the same serialized value more than once causing the position to be improperly offset.");
583+
throw new OverflowException($"Invalid reader position detected when trying to read a string of size {(uint)readSize}! This can result from an error in the serialization. Ensure deserialization exactly matches what was serialized!");
584584
}
585585
return readSize;
586586
}

0 commit comments

Comments
 (0)