Commit 604e62c9 authored by Marvin Scholz's avatar Marvin Scholz Committed by Henrik Gramner

checkasm: Fix comparison of different int signs

Casting here should be safe as the case name_length < 0 is already
checked before.
parent b8be5f64
......@@ -474,7 +474,7 @@ void *checkasm_check_func(void *const func, const char *const name, ...) {
const int name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);
va_end(arg);
if (!func || name_length <= 0 || name_length >= sizeof(name_buf))
if (!func || name_length <= 0 || (size_t)name_length >= sizeof(name_buf))
return NULL;
state.current_func = get_func(&state.funcs, name_buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment