Applied changes to jp3d_to_volume.c that didn't pass in previous revision (rev545)
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Fri, 19 Feb 2010 13:37:27 +0000 (13:37 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Fri, 19 Feb 2010 13:37:27 +0000 (13:37 +0000)
jp3d/codec/jp3d_to_volume.c

index caa275bf40d72b1899c7c84edbb93d8409666ba7..4086b20deb8601e8f7b993cbd120844827465ff9 100755 (executable)
@@ -197,7 +197,7 @@ int get_file_format(char *filename) {
        static const char *extension[] = {"pgx", "bin", "j3d", "jp3d", "j2k", "img"};\r
        static const int format[] = { PGX_DFMT, BIN_DFMT, J3D_CFMT, J3D_CFMT, J2K_CFMT, IMG_DFMT};\r
        char * ext = strrchr(filename, '.') + 1;\r
-       for(i = 0; i < sizeof(format); i++) {\r
+       for(i = 0; i < sizeof(format) / sizeof(format[0]); i++) {\r
                if(strnicmp(ext, extension[i], 3) == 0) {\r
                        return format[i];\r
                }\r