diff --git a/src/libutil/util.hh b/src/libutil/util.hh index e6eb65017..44b8370bf 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -512,7 +512,7 @@ T readLittleEndian(unsigned char * p) { T x = 0; for (size_t i = 0; i < sizeof(x); ++i) - x |= *p++ << (i * 8); + x |= ((T) *p++) << (i * 8); return x; }