File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -813,9 +813,10 @@ bool MathLib::isIntHex(const std::string& str)
813813 state = DIGIT;
814814 else
815815 return false ;
816+ break ;
816817 case DIGIT:
817818 if (isxdigit (static_cast <unsigned char >(*it)))
818- ; // state = DIGITS ;
819+ ; // state = DIGIT ;
819820 else
820821 return isValidIntegerSuffix (it,str.end ());
821822 break ;
Original file line number Diff line number Diff line change @@ -668,6 +668,7 @@ class TestMathLib : public TestFixture {
668668 ASSERT_EQUALS (false , MathLib::isIntHex (" +0x" ));
669669 ASSERT_EQUALS (false , MathLib::isIntHex (" -0x" ));
670670 ASSERT_EQUALS (false , MathLib::isIntHex (" 0x" ));
671+ ASSERT_EQUALS (false , MathLib::isIntHex (" 0xl" ));
671672 ASSERT_EQUALS (false , MathLib::isIntHex (" 0xx" ));
672673 ASSERT_EQUALS (false , MathLib::isIntHex (" -0175" ));
673674 ASSERT_EQUALS (false , MathLib::isIntHex (" -0_garbage_" ));
You can’t perform that action at this time.
0 commit comments