"bmp", "dib", "gif", "png", "webp",
};
char *filename = strrchr(path, '/');
- if (NULL == filename || NULL == filename + 1)
+ if (NULL == filename || '\0' == filename[1])
return false;
char *ext = strrchr(filename + 1, '.');
- if (NULL == ext || NULL == ext + 1)
+ if (NULL == ext || '\0' == ext[1])
return false;
for (int i = 0; i < 10; i++) {
if (!strcmp(ext + 1, ext_list[i]))