We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 580d292 commit ce64b61Copy full SHA for ce64b61
MLAPI/NetworkingManagerComponents/Binary/BitStream.cs
@@ -347,11 +347,16 @@ public void CopyFrom(Stream s, int count = -1)
347
if (s is BitStream b) Write(b.target, 0, count < 0 ? (int)b.Length : count);
348
else
349
{
350
+ long currentPosition = s.Position;
351
+ s.Position = 0;
352
+
353
int read;
354
bool readToEnd = count < 0;
355
while ((readToEnd || count-- > 0) && (read = s.ReadByte()) != -1)
356
_WriteIntByte(read);
357
UpdateLength();
358
359
+ s.Position = currentPosition;
360
}
361
362
0 commit comments