]> git.tdb.fi Git - libs/datafile.git/commitdiff
Use automatic base detection when parsing integers
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 9dfb54421a47c6f041b344cc175a6c67e232f43c..125c1d5ab5403af6fd2b1d96cd2108000559bc4f 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)