Skip to content

Commit

Permalink
use "U" for encoding short-int in table values
Browse files Browse the repository at this point in the history
should close agoragames#98
  • Loading branch information
allan-simon authored Mar 29, 2018
1 parent 7b004e1 commit aa0c5ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haigha/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _field_bool(self, val, pack=Struct('B').pack):
def _field_int(self, val, short_pack=Struct('>h').pack,
int_pack=Struct('>i').pack, long_pack=Struct('>q').pack):
if -2 ** 15 <= val < 2 ** 15:
self._output_buffer.append('s')
self._output_buffer.append('U')
self._output_buffer.extend(short_pack(val))
elif -2 ** 31 <= val < 2 ** 31:
self._output_buffer.append('I')
Expand Down

0 comments on commit aa0c5ab

Please sign in to comment.