|
@@ -405,11 +405,13 @@ void MDLImporter::InternReadFile_Quake1() {
|
|
}
|
|
}
|
|
// go to the end of the skin section / the beginning of the next skin
|
|
// go to the end of the skin section / the beginning of the next skin
|
|
bool overflow = false;
|
|
bool overflow = false;
|
|
- if ((pcHeader->skinheight > INT_MAX / pcHeader->skinwidth) || (pcHeader->skinwidth > INT_MAX / pcHeader->skinheight)){
|
|
|
|
- overflow = true;
|
|
|
|
- }
|
|
|
|
- if (!overflow) {
|
|
|
|
- szCurrent += pcHeader->skinheight * pcHeader->skinwidth +sizeof(float) * iNumImages;
|
|
|
|
|
|
+ if (pcHeader->skinwidth != 0 || pcHeader->skinheight != 0) {
|
|
|
|
+ if ((pcHeader->skinheight > INT_MAX / pcHeader->skinwidth) || (pcHeader->skinwidth > INT_MAX / pcHeader->skinheight)){
|
|
|
|
+ overflow = true;
|
|
|
|
+ }
|
|
|
|
+ if (!overflow) {
|
|
|
|
+ szCurrent += pcHeader->skinheight * pcHeader->skinwidth +sizeof(float) * iNumImages;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|