From 9bb3fed611f32f10366ae47e5463561f87283350 Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 25 Jul 2023 17:23:27 +0200 Subject: [PATCH] libluna: Use the right unsigned integer type for wcscmp()'s return type --- libluna/src/CString.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libluna/src/CString.cpp b/libluna/src/CString.cpp index fc66de79..b4ffd864 100644 --- a/libluna/src/CString.cpp +++ b/libluna/src/CString.cpp @@ -81,7 +81,8 @@ extern "C" a++; b++; } - return *(const u8*)a - *(const u8*)b; + static_assert(sizeof(wchar_t) == sizeof(u32)); + return *(const u32*)a - *(const u32*)b; } int strncmp(const char* a, const char* b, usize max)