Fixed bug in C code due to implicit non-Boolean conditions and incorrect refactoring (related to commit af67fe1c0b).

This commit is contained in:
Project Nayuki 2017-04-20 18:11:22 +00:00
parent 18b7180580
commit e1596c3b07
1 changed files with 2 additions and 2 deletions

View File

@ -216,9 +216,9 @@ static int getTextProperties(const char *text, bool *isNumeric, bool *isAlphanum
}
long tempBits;
if (isNumeric)
if (*isNumeric)
tempBits = textLen * 3L + (textLen + 2L) / 3;
else if (isAlphanumeric)
else if (*isAlphanumeric)
tempBits = textLen * 5L + (textLen + 1L) / 2;
else // Binary mode
tempBits = textLen * 8L;