diff options
| author | Norm MacDownlad <megazig@megazig-desktop.(none)> | 2009-10-19 12:39:52 -0500 |
|---|---|---|
| committer | Norm MacDownlad <megazig@megazig-desktop.(none)> | 2009-10-19 12:39:52 -0500 |
| commit | 56c06a7eba37d9634d89964d45bb7bd55eb901b2 (patch) | |
| tree | 99d2096c56b429d72703b416aaf580f92e564503 | |
| parent | 65210f63c38a0c35b2e9dd52be79ad330d816e67 (diff) | |
added check for texture/material range to stop a strcmp bug
Diffstat (limited to '')
| -rw-r--r-- | brlyt.c | 10 | ||||
| -rw-r--r-- | general.h | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -410,6 +410,11 @@ u16 findMatOffset(char *mats) isEqual = strcmp(mats, mat); if (isEqual != 0) i++; mat = mat + strlen(mat) + 1; + if( i == numberOfMaterials ) + { + printf("ERROR: material not found: %s\n", mats); + exit(-1); + } } return i; } @@ -424,6 +429,11 @@ u16 findTexOffset(char *tex) isEqual = strcmp(tex, texs); if (isEqual != 0) i++; texs = texs + strlen(texs) + 1; + if( i == numberOfTextures ) + { + printf("ERROR: texture not found: %s\n", tex); + exit(-1); + } } return i; } @@ -12,7 +12,7 @@ #define BENZIN_VERSION_MAJOR 1 #define BENZIN_VERSION_MINOR 9 -#define BENZIN_VERSION_BUILD 7 +#define BENZIN_VERSION_BUILD 8 #define BENZIN_VERSION_OTHER "BETA" #define INFORMATION_TEXT \ |
