fix both the black skins and phrosty's overzealous memcpy bugs

This commit is contained in:
Bill Currie 2007-04-03 22:47:42 +00:00 committed by Jeff Teunissen
parent 3cb9e089ef
commit 51a7392730
2 changed files with 14 additions and 8 deletions

View file

@ -173,6 +173,13 @@ Skin_Cache (skin_t *skin)
return NULL;
}
}
pixels = 320 * 200;
out = Cache_Alloc (&skin->data.cache, field_offset (tex_t, data[pixels]),
skin->name);
if (!out)
Sys_Error ("Skin_Cache: couldn't allocate");
tex = LoadPCX (file, 0, vid.palette);
Qclose (file);
@ -181,11 +188,7 @@ Skin_Cache (skin_t *skin)
Con_Printf ("Bad skin %s\n", name);
return NULL;
}
pixels = 320 * 200;
out = Cache_Alloc (&skin->data.cache, field_offset (tex_t, data[pixels]), skin->name);
if (!out)
Sys_Error ("Skin_Cache: couldn't allocate");
opix = out->data;
out->width = 320;
out->height = 200;

View file

@ -171,6 +171,13 @@ Skin_Cache (skin_t *skin)
return NULL;
}
}
pixels = 320 * 200;
out = Cache_Alloc (&skin->data.cache, field_offset (tex_t, data[pixels]),
skin->name);
if (!out)
Sys_Error ("Skin_Cache: couldn't allocate");
tex = LoadPCX (file, 0, vid.palette);
Qclose (file);
@ -179,11 +186,7 @@ Skin_Cache (skin_t *skin)
Con_Printf ("Bad skin %s\n", name);
return NULL;
}
pixels = 320 * 200;
out = Cache_Alloc (&skin->data.cache, field_offset (tex_t, data[pixels]), skin->name);
if (!out)
Sys_Error ("Skin_Cache: couldn't allocate");
opix = out->data;
out->width = 320;
out->height = 200;