diff --git a/tccelf.c b/tccelf.c index fb21abc3..8d47e1a0 100644 --- a/tccelf.c +++ b/tccelf.c @@ -2830,7 +2830,7 @@ static int filename_to_libname(TCCState *s1, const char filename[], char libname int libprefix; /* already converted to library name */ - if (libname[0] == '\0') + if (libname[0] != '\0') return 1; ext = tcc_fileextension(filename); if (*ext == '\0')