From 129297a0b0129116c7fe1e0127cc00353b482405 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 22 Jan 2023 11:43:10 +0100 Subject: [PATCH] CString: Fix compilation in strnlen() --- luna/src/CString.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luna/src/CString.cpp b/luna/src/CString.cpp index b853c471..e1ba020e 100644 --- a/luna/src/CString.cpp +++ b/luna/src/CString.cpp @@ -49,7 +49,7 @@ extern "C" usize strnlen(const char* str, usize max) { const char* i = str; - for (; max, *i; ++i, --max) + for (; *i && max; ++i, --max) ; return (usize)(i - str); }