fix parse_hex_integer_string not parsing correctly
authorJacob Lifshay <programmerjake@gmail.com>
Mon, 5 Jun 2017 08:17:29 +0000 (01:17 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Mon, 5 Jun 2017 08:17:29 +0000 (01:17 -0700)
src/generate_spirv_parser/parser.cpp

index 7544b1b2ef446f57789929a77e4d85df5c054d43..267281699d89dee1c593641d5929aaad1be7849b 100644 (file)
@@ -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<unsigned>(digit) > max_value % base))
+           || (retval == max_value / base && static_cast<unsigned>(digit) > max_value % base))
             throw Parse_error(
                 value.location, parent_path_builder->path(), std::string(name) + ": value too big");
         retval *= base;