Fixed strCmp.

This commit is contained in:
Бранимир Караџић
2019-02-17 16:09:58 -08:00
parent 1b29d67158
commit bb3426030a
2 changed files with 10 additions and 1 deletions

View File

@@ -188,7 +188,12 @@ namespace bx
}
}
return 0 == max && _lhsMax == _rhsMax ? 0 : fn(*_lhs) - fn(*_rhs);
if (0 == max)
{
return _lhsMax == _rhsMax ? 0 : _lhsMax > _rhsMax ? 1 : -1;
}
return fn(*_lhs) - fn(*_rhs);
}
int32_t strCmp(const StringView& _lhs, const StringView& _rhs, int32_t _max)