From 224ae3c326b0c23fbce6e781fbd897c0df7a3259 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Sat, 26 Oct 2019 17:30:04 +0200 Subject: [PATCH] Bump simplecpp (#2297) --- externals/simplecpp/simplecpp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index af48ca27f..2eabaf4a8 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -780,7 +780,10 @@ void simplecpp::TokenList::combineOperators() } // match: [0-9.]+E [+-] [0-9]+ const char lastChar = tok->str()[tok->str().size() - 1]; - if (tok->number && !isHex(tok->str()) && !isOct(tok->str()) && (lastChar == 'E' || lastChar == 'e') && tok->next && tok->next->isOneOf("+-") && tok->next->next && tok->next->next->number) { + if (tok->number && !isOct(tok->str()) && + ((!isHex(tok->str()) && (lastChar == 'E' || lastChar == 'e')) || + (isHex(tok->str()) && (lastChar == 'P' || lastChar == 'p'))) && + tok->next && tok->next->isOneOf("+-") && tok->next->next && tok->next->next->number) { tok->setstr(tok->str() + tok->next->op + tok->next->next->str()); deleteToken(tok->next); deleteToken(tok->next);