diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index 772aed07d..5d92006e2 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -1089,7 +1089,7 @@ std::string simplecpp::TokenList::lastLine(int maxsize) const if (!ret.empty()) ret = ' ' + ret; ret = (tok->str()[0] == '\"' ? std::string("%str%") - : std::isdigit(static_cast(tok->str()[0])) ? std::string("%num%") : tok->str()) + ret; + : tok->number ? std::string("%num%") : tok->str()) + ret; if (++count > maxsize) return ""; } diff --git a/externals/simplecpp/simplecpp.h b/externals/simplecpp/simplecpp.h index df1d4d2fe..b4bce4c1d 100644 --- a/externals/simplecpp/simplecpp.h +++ b/externals/simplecpp/simplecpp.h @@ -113,7 +113,9 @@ namespace simplecpp { op = (string.size() == 1U) ? string[0] : '\0'; } - const TokenString& str() const { return string; } + const TokenString& str() const { + return string; + } void setstr(const std::string &s) { string = s; flags(); @@ -258,7 +260,7 @@ namespace simplecpp { std::string readUntil(std::istream &istr, const Location &location, const char start, const char end, OutputList *outputList); - std::string lastLine(int maxsize=10) const; + std::string lastLine(int maxsize=100000) const; unsigned int fileIndex(const std::string &filename);