Of course we need to leave room for ".png\0"...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1439 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
3cdae4332f
commit
e8da218797
|
@ -145,7 +145,7 @@ iIMDShape *iV_ProcessIMD( char **ppFileData, char *FileDataEnd )
|
|||
if (strcmp(buffer, "TEXTURE") == 0) {
|
||||
ch = *pFileData++;
|
||||
|
||||
for( i = 0; (i < MAX_PATH) && ((ch = *pFileData++) != EOF) && (ch != '.'); i++ ) // yummy
|
||||
for( i = 0; (i < MAX_PATH-5) && ((ch = *pFileData++) != EOF) && (ch != '.'); i++ ) // Run up to the dot or till the buffer is filled. Leave room for the extension.
|
||||
{
|
||||
texfile[i] = (char)ch;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue