another error in commit r34143, was using the define's 'BLEN' & 'DER_' however the latter is incorrect since DER- is used for 64bit blend files.

removed the define.
This commit is contained in:
Campbell Barton
2011-01-07 09:47:05 +00:00
parent 7fe16a24a4
commit 41c00063dd
2 changed files with 3 additions and 6 deletions

View 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')

View 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 {