Browse Source

Handle negative errcodes

dev
x3 2 years ago
parent
commit
bb4da9ea31
Signed by: x3 <sugarpanning@cock.li> GPG Key ID: 7E9961E8AD0E240E
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/error.c

+ 1
- 1
src/error.c View File

@@ -6,7 +6,7 @@ static const char *error_string[] = {

const char *error_to_string(enum error err)
{
if (err >= _ERR_COUNT)
if (err >= _ERR_COUNT || err < 0)
return "ERR_UNKNOWN";
return error_string[err];
}

Loading…
Cancel
Save