another error in commit r34143, was using the define's 'BLEN' & 'DER_' however the...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 09:47:05 +0000 (09:47 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 09:47:05 +0000 (09:47 +0000)
removed the define.

source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/intern/exotic.c

index f152ff16afbd92e9cebcded5be897d1ad3074fe4..46746bbb4a349a4f8dd52139ff7cd22aaaa2c0a2 100644 (file)
@@ -204,8 +204,6 @@ do { \
 #define ID_NEW(a)              if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
 
 #define BLEN MAKE_ID('B','L','E','N')
-#define DER_ MAKE_ID('D','E','R','_')
-#define V100 MAKE_ID('V','1','0','0')
 
 #define DATA MAKE_ID('D','A','T','A')
 #define GLOB MAKE_ID('G','L','O','B')
index 2c08e772a1aa74f6164be86893fe0e0b14db225e..d19226b24785b2373371a85df3678d696315328c 100644 (file)
@@ -458,7 +458,7 @@ int BKE_read_exotic(Scene *scene, const char *name)
 {
        int len;
        gzFile gzfile;
-       int head[2];
+       char header[7];
        int retval;
 
        // make sure we're not trying to read a directory....
@@ -474,10 +474,9 @@ int BKE_read_exotic(Scene *scene, const char *name)
                        retval= BKE_READ_EXOTIC_FAIL_OPEN;
                }
                else {
-                       len= gzread(gzfile, head, sizeof(head));
+                       len= gzread(gzfile, header, sizeof(header));
                        gzclose(gzfile);
-
-                       if (len == sizeof(head) && (head[0] == BLEN && head[1] == DER_)) {
+                       if (len == sizeof(header) && strncmp(header, "BLENDER", 7) == 0) {
                                retval= BKE_READ_EXOTIC_OK_BLEND;
                        }
                        else {