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

pull/11/head
Project Nayuki 9 years ago
parent 18b7180580
commit e1596c3b07

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

Loading…
Cancel
Save