From d7f581d8ade38901b9af62c77bebb32913f0254a Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 15 May 2023 23:14:26 -0400 Subject: [PATCH] fix compiler complaint a check for baselen being less than or equal to zero drew a compiler complaint because the variable is unsigned --- src/sounds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sounds.c b/src/sounds.c index 0a6582f5e..34245860f 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -2084,7 +2084,7 @@ base_soundname_to_filename( consumes += 1; /* for trailing NUL */ /* existinglen could be >= bufsz if caller didn't initialize buf * to properly include a trailing NUL */ - if (baselen <= 0 || consumes > bufsz || existinglen >= bufsz) + if (!baselen || consumes > bufsz || existinglen >= bufsz) return (char *) 0; #if 0