Simplified an integer comparison in C code.

pull/47/head
Project Nayuki 6 years ago
parent ec729bf269
commit a072562461

@ -853,7 +853,7 @@ testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars) {
return -1;
}
assert(result >= 0);
if (result > (unsigned int)INT16_MAX)
if (result > INT16_MAX)
return -1;
return (int)result;
}

Loading…
Cancel
Save