Skip to content

Commit f75a423

Browse files
domslelementbound
andauthored
fix: Use correct hex constant for flag bit in VariableBitsetSerializer (#596)
Set the continuation flag to 0x80 (128) instead of 80 (decimal), ensuring the highest bit is correctly set to indicate more bytes to read --------- Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
1 parent 91da635 commit f75a423

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

addons/netfox.extras/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.extras"
44
description="Game-specific utilities for Netfox"
55
author="Tamas Galffy and contributors"
6-
version="1.43.3"
6+
version="1.43.4"
77
script="netfox-extras.gd"

addons/netfox.internals/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.internals"
44
description="Shared internals for netfox addons"
55
author="Tamas Galffy and contributors"
6-
version="1.43.3"
6+
version="1.43.4"
77
script="plugin.gd"

addons/netfox.noray/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.noray"
44
description="Bulletproof your connectivity with noray integration for netfox"
55
author="Tamas Galffy and contributors"
6-
version="1.43.3"
6+
version="1.43.4"
77
script="netfox-noray.gd"

addons/netfox/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox"
44
description="Shared internals for netfox addons"
55
author="Tamas Galffy and contributors"
6-
version="1.43.3"
6+
version="1.43.4"
77
script="netfox.gd"

addons/netfox/schemas/network-schemas.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ class _VariableBitsetSerializer extends NetworkSchemaSerializer:
579579
if bitset.bit_count() > i + 6 and bitset.get_bit(i + 6): byte |= 0x40
580580

581581
# Set highest bit if there's more bytes to read
582-
if bitset.bit_count() > i + 7: byte |= 80
582+
if bitset.bit_count() > i + 7: byte |= 0x80
583583

584584
b.put_u8(byte)
585585

test/netfox/schemas/network-schemas.test.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ func suite() -> void:
8686
["netref name", NetworkSchemas._netref(), _NetworkIdentityReference.of_full_name("path"), 9],
8787

8888
# Private
89-
["varbits", NetworkSchemas._varbits(), _Bitset.of_bools([0, 1, 0, 1, 1, 0, 1]), 1]
89+
["varbits", NetworkSchemas._varbits(), _Bitset.of_bools([0, 1, 0, 1, 1, 0, 1]), 1],
90+
["varbits", NetworkSchemas._varbits(), _Bitset.of_bools([0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1]), 2],
9091
]
9192

9293
for case in cases:

0 commit comments

Comments
 (0)