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); }