Hello Jose,
The following patch rewrites ios_read_int to also include unaligned values and non-trivial int sizes. While doing so, moves the common functionality between ios_read_int and ios_read_uint into ios_read_int_common.
The functionality is externally tested. If you don't mind, I'll add the test cases into poke, after implementing ios_write_int/uint as well.
The proposed ChangeLog is the following:
2019-11-03 Egeyar Bagcioglu <
address@hidden>
* src/ios.c (ios_read_int): Rewrite.
(ios_read_uint): Move the common functionality between read_ios_int
and read_ios_uint from here ...
(ios_read_int_common): ... to here.
Please take a look and apply if appropriate.
Regards,
Egeyar