diff options
| author | Dave Chapman <dave@dchapman.com> | 2006-04-03 17:38:18 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2006-04-03 17:38:18 +0000 |
| commit | 484c1584c6ab97581e3f315baf36320ad59df138 (patch) | |
| tree | 0228d35a2f1b606a75a11400507217401f7e46bd /apps/plugins | |
| parent | 1d51dce70b4ec2928a9c8ecf9722962c223459f7 (diff) | |
| download | rockbox-484c1584c6ab97581e3f315baf36320ad59df138.zip rockbox-484c1584c6ab97581e3f315baf36320ad59df138.tar.gz rockbox-484c1584c6ab97581e3f315baf36320ad59df138.tar.bz2 rockbox-484c1584c6ab97581e3f315baf36320ad59df138.tar.xz | |
Prevent a potential unaligned memory access
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9462 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/doom/r_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/doom/r_data.c b/apps/plugins/doom/r_data.c index 1d5c6ad..b5ff95a 100644 --- a/apps/plugins/doom/r_data.c +++ b/apps/plugins/doom/r_data.c @@ -395,7 +395,7 @@ void R_InitTextures (void) const int *maptex1, *maptex2; char name[9]; int names_lump; // cph - new wad lump handling - const char *names; // cph - + const unsigned char *names; // cph - const char *name_p;// const*'s int *patchlookup; int totalwidth; @@ -409,7 +409,7 @@ void R_InitTextures (void) // Load the patch names from pnames.lmp. name[8] = 0; names = W_CacheLumpNum(names_lump = W_GetNumForName("PNAMES")); - nummappatches = LONG(*((const int *)names)); + nummappatches = (names[3]<<24)|(names[2]<<16)|(names[1]<<8)|names[0]; name_p = names+4; patchlookup = malloc(nummappatches*sizeof(*patchlookup)); // killough |