aboutsummaryrefslogtreecommitdiff
path: root/libc/src/strings/strncasecmp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/strings/strncasecmp.cpp')
-rw-r--r--libc/src/strings/strncasecmp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/strings/strncasecmp.cpp b/libc/src/strings/strncasecmp.cpp
index 9c2f0ab..a592649 100644
--- a/libc/src/strings/strncasecmp.cpp
+++ b/libc/src/strings/strncasecmp.cpp
@@ -18,8 +18,8 @@ namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, strncasecmp,
(const char *left, const char *right, size_t n)) {
auto case_cmp = [](char a, char b) {
- return LIBC_NAMESPACE::internal::tolower(a) -
- LIBC_NAMESPACE::internal::tolower(b);
+ return static_cast<int>(LIBC_NAMESPACE::internal::tolower(a)) -
+ static_cast<int>(LIBC_NAMESPACE::internal::tolower(b));
};
return inline_strncmp(left, right, n, case_cmp);
}