string: fix strncoll to trim string lengths
Some checks failed
Doxygen Action / build (push) Has been cancelled
Some checks failed
Doxygen Action / build (push) Has been cancelled
MSVC implementation does not stop on zero terminator. Signed-off-by: Simon Rozman <simon.rozman@amebis.si>
This commit is contained in:
@@ -1511,7 +1511,7 @@ namespace stdex
|
||||
stdex_assert(str1 || !count1);
|
||||
stdex_assert(str2 || !count2);
|
||||
auto& collate = std::use_facet<std::collate<T>>(locale);
|
||||
return collate.compare(str1, str1 + count1, str2, str2 + count2);
|
||||
return collate.compare(str1, str1 + strnlen(str1, count1), str2, str2 + strnlen(str2, count2));
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user