diff --git a/libs/libc/time/lib_localtime.c b/libs/libc/time/lib_localtime.c index 5058a8d2e2..0f981b08d3 100644 --- a/libs/libc/time/lib_localtime.c +++ b/libs/libc/time/lib_localtime.c @@ -461,7 +461,7 @@ static int_fast64_t detzcode64(FAR const char *codep) result = (codep[0] & 0x80) ? -1 : 0; for (i = 0; i < 8; ++i) { - result = (result << 8) | (codep[i] & 0xff); + result = (result * 256) | (codep[i] & 0xff); } return result;