chiark / gitweb /
integer arithmetic types: make get_uint32, get_uint16 return the correct type
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2011 21:37:24 +0000 (22:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2011 11:07:26 +0000 (12:07 +0100)
Previously get_uint32 and get_uint16 would return whatever the usual
arithmetic conversions produced.  (The previous code was not in fact
even guaranteed to work properly on a machine with 16-bit ints.)

Now we cast the individual bytes before shifting.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>

No differences found