Fix for critical bug with BulkBlockUpdate packet handling. (Thanks 123DMWM)

This commit is contained in:
UnknownShadow200 2016-03-03 07:10:14 +11:00
parent 0e320c6cf0
commit 77e52bb592

View File

@ -475,6 +475,7 @@ namespace ClassicalSharp {
int* indices = stackalloc int[bulkCount];
for( int i = 0; i < count; i++ )
indices[i] = reader.ReadInt32();
reader.Skip( (bulkCount - count) * sizeof(int) );
for( int i = 0; i < count; i++ ) {
byte block = reader.ReadUInt8();
@ -486,6 +487,7 @@ namespace ClassicalSharp {
}
game.UpdateBlock( coords.X, coords.Y, coords.Z, block );
}
reader.Skip( bulkCount - count );
}
void HandleSetTextColor() {