memcmp() returns a signed int!

This commit is contained in:
Andrew Meadows 2014-03-06 14:33:59 -08:00
parent 455ef15754
commit 0b2c399713

View file

@ -176,7 +176,7 @@ OctalCodeComparison compareOctalCodes(const unsigned char* codeA, const unsigned
OctalCodeComparison result = LESS_THAN; // assume it's shallower
size_t numberOfBytes = std::min(bytesRequiredForCodeLength(*codeA), bytesRequiredForCodeLength(*codeB));
size_t compare = memcmp(codeA, codeB, numberOfBytes);
int compare = memcmp(codeA, codeB, numberOfBytes);
if (compare < 0) {
result = LESS_THAN;