diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-12-12 12:40:51 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-12-12 12:40:51 +0100 |
commit | 786402365e9c819235636d9300bd25c362a29db7 (patch) | |
tree | 9c0d0dec6886b404b729414830d3a759e7f019c1 /src/libutil/util.hh | |
parent | f3d1e92856fbed53ebaad40f94180bd1ba60ffec (diff) |
Cleanup
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 2f869d909..9b149de80 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -515,8 +515,9 @@ template<typename T> T readLittleEndian(unsigned char * p) { T x = 0; - for (size_t i = 0; i < sizeof(x); ++i) - x |= ((T) *p++) << (i * 8); + for (size_t i = 0; i < sizeof(x); ++i, ++p) { + x |= ((T) *p) << (i * 8); + } return x; } |