Files
Nitro_Render_V3/packages/communication
simoleo89 999b8187d6 Fix PetBreedingMessageParser bytesAvailable check
bytesAvailable is a boolean (IMessageDataWrapper.bytesAvailable: boolean,
returns 'there is at least one byte left'); the parser was doing
'wrapper.bytesAvailable < 12' as if it were a count, which both
mis-compares boolean to number and short-circuits incorrectly when
exactly 11 bytes remain.

Align with every other parser in the codebase: 'if(!wrapper ||
!wrapper.bytesAvailable) return false;'. The downstream readInt
calls already throw on truncated packets so the explicit length
check was load-bearing only against malformed inputs that wouldn't
parse anyway.
2026-05-11 21:09:41 +02:00
..
2024-04-03 09:27:56 +02:00
2024-04-03 09:27:56 +02:00
2024-07-04 15:03:26 +02:00