diff --git a/include/flatbuffers/util.h b/include/flatbuffers/util.h index e3178e30a..e6540105a 100644 --- a/include/flatbuffers/util.h +++ b/include/flatbuffers/util.h @@ -321,7 +321,7 @@ inline int FromUTF8(const char **in) { break; } } - if ((**in << len) & 0x80) return -1; // Bit after leading 1's must be 0. + if ((static_cast(**in) << len) & 0x80) return -1; // Bit after leading 1's must be 0. if (!len) return *(*in)++; // UTF-8 encoded values with a length are between 2 and 4 bytes. if (len < 2 || len > 4) { return -1; }