lump = (byte*) header + offset;
lumpInt = LittleLong( (int) *((int*) lump) );
lumpFloat = LittleFloat( (float) *((float*) lump) );
- memcpy( lumpString, (char*) lump, (length < 1024 ? length : 1024) );
- lumpString[ 1024 ] = '\0';
+ memcpy( lumpString, (char*) lump, (length < sizeof(lumpString) ? length : sizeof(lumpString)-1) );
+ lumpString[ sizeof(lumpString)-1 ] = '\0';
/* print basic lump info */
Sys_Printf( "Lump: %d\n", i );
char *skinfilecontent;
int skinfilesize;
char *skinfileptr, *skinfilenextptr;
- FILE *skinfilehandle;
/* get model */
/* load skin file */
snprintf(skinfilename, sizeof(skinfilename), "%s_%d.skin", name, skin);
skinfilename[sizeof(skinfilename)-1] = 0;
- skinfilehandle = fopen(skinfilename, "r");
skinfilesize = vfsLoadFile(skinfilename, (void**) &skinfilecontent, 0);
if(skinfilesize < 0 && skin != 0)
{