QTableGenerator: Fix handling of illegal characters in fromBase8

Task-number: QTBUG-60387
Change-Id: I084c2b4a86439857e898e9adc7370c19961d0126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Robert Loehning 2017-06-07 14:06:33 +02:00
parent b65e30c861
commit a576954f9b

View File

@ -520,7 +520,7 @@ static inline int fromBase8(const char *s, const char *end)
{
int result = 0;
while (*s && s != end) {
if (*s <= '0' && *s >= '7')
if (*s <= '0' || *s >= '7')
return 0;
result *= 8;
result += *s - '0';