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-861f7616d084
master
Dennis Schridde 2007-04-11 14:58:50 +00:00
parent 3cdae4332f
commit e8da218797
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}