Use automatic base detection when parsing integers master
authorMikko Rasa <tdb@tdb.fi>
Wed, 21 Feb 2018 17:30:40 +0000 (19:30 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 21 Feb 2018 17:30:40 +0000 (19:30 +0200)
source/statement.cpp

index 9dfb544..125c1d5 100644 (file)
@@ -40,7 +40,7 @@ string Statement::get_signature() const
 Statement &Statement::append_from_token(const Token &token)
 {
        if(token.type==Token::INTEGER)
-               return append(lexical_cast<IntType::Store>(token.str));
+               return append(lexical_cast<IntType::Store>(token.str, Fmt().autobase()));
        else if(token.type==Token::FLOAT)
                return append(lexical_cast<FloatType::Store>(token.str));
        else if(token.type==Token::STRING)