From: Jacob Lifshay Date: Mon, 5 Jun 2017 08:17:29 +0000 (-0700) Subject: fix parse_hex_integer_string not parsing correctly X-Git-Tag: gsoc-2017~107 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c8f8da4f3efad595abdb22d115bce5cb94afbde;p=kazan.git fix parse_hex_integer_string not parsing correctly --- diff --git a/src/generate_spirv_parser/parser.cpp b/src/generate_spirv_parser/parser.cpp index 7544b1b..2672816 100644 --- a/src/generate_spirv_parser/parser.cpp +++ b/src/generate_spirv_parser/parser.cpp @@ -177,7 +177,7 @@ T parse_hex_integer_string(const json::ast::Value &value, parent_path_builder->path(), std::string(name) + " has too many digits"); if(retval > max_value / base - || (retval = max_value / base && static_cast(digit) > max_value % base)) + || (retval == max_value / base && static_cast(digit) > max_value % base)) throw Parse_error( value.location, parent_path_builder->path(), std::string(name) + ": value too big"); retval *= base;