[trunk] Make sure to test value not pointer
Update issue 302
This commit is contained in:
parent
5e1a0fad08
commit
9ba6bc6042
|
@ -222,7 +222,7 @@ int get_file_format(const char *filename) {
|
||||||
if (ext == NULL)
|
if (ext == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
ext++;
|
ext++;
|
||||||
if(ext) {
|
if(*ext) {
|
||||||
for(i = 0; i < sizeof(format)/sizeof(*format); i++) {
|
for(i = 0; i < sizeof(format)/sizeof(*format); i++) {
|
||||||
if(strcasecmp(ext, extension[i]) == 0) {
|
if(strcasecmp(ext, extension[i]) == 0) {
|
||||||
return format[i];
|
return format[i];
|
||||||
|
|
Loading…
Reference in New Issue