This commit is contained in:
Theluyuan 2024-04-10 08:21:29 +08:00
parent 40fc2aa583
commit 98ffb62c34

View File

@ -640,10 +640,10 @@ void print_usage ()
); );
} }
extern char *rindex(const char *s, int c); extern char *strrchr(const char *s, int c);
int is_extension(char *filename, char *check_ext) int is_extension(char *filename, char *check_ext)
{ {
char *ext = rindex(filename, '.'); char *ext = strrchr(filename, '.');
if (ext == NULL) if (ext == NULL)
return 0; return 0;