diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index dc8f58132..e89a39151 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -280,7 +280,7 @@ CheckedError Parser::Next() { int unicode_high_surrogate = -1; while (*cursor_ != c) { - if (*cursor_ < ' ' && *cursor_ >= 0) + if (*cursor_ < ' ' && static_cast(*cursor_) >= 0) return Error("illegal character in string constant"); if (*cursor_ == '\\') { cursor_++;