mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:03:36 +02:00
memcmp() returns a signed int!
This commit is contained in:
parent
455ef15754
commit
0b2c399713
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ OctalCodeComparison compareOctalCodes(const unsigned char* codeA, const unsigned
|
||||||
OctalCodeComparison result = LESS_THAN; // assume it's shallower
|
OctalCodeComparison result = LESS_THAN; // assume it's shallower
|
||||||
|
|
||||||
size_t numberOfBytes = std::min(bytesRequiredForCodeLength(*codeA), bytesRequiredForCodeLength(*codeB));
|
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) {
|
if (compare < 0) {
|
||||||
result = LESS_THAN;
|
result = LESS_THAN;
|
||||||
|
|
Loading…
Reference in a new issue