mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
less trivial stuff
- fix one bound-checking line - rewrite two lines in astub.c to potentially not overflow an int16 - make tiletovox[] an array of int16's git-svn-id: https://svn.eduke32.com/eduke32@2266 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2e1e2345af
commit
cd89fce9aa
4 changed files with 5 additions and 5 deletions
|
@ -387,7 +387,7 @@ extern int32_t dommxoverlay, novoxmips;
|
|||
|
||||
extern float debug1, debug2;
|
||||
|
||||
extern int32_t tiletovox[MAXTILES];
|
||||
extern int16_t tiletovox[MAXTILES];
|
||||
extern int32_t usevoxels, voxscale[MAXVOXELS];
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
|
|
@ -77,7 +77,7 @@ static void drawpixel_safe(void *s, char a)
|
|||
}
|
||||
|
||||
//void loadvoxel(int32_t voxindex) { UNREFERENCED_PARAMATER(voxindex); }
|
||||
int32_t tiletovox[MAXTILES];
|
||||
int16_t tiletovox[MAXTILES];
|
||||
int32_t usevoxels = 1;
|
||||
//#define kloadvoxel loadvoxel
|
||||
|
||||
|
|
|
@ -5723,8 +5723,8 @@ static void Keys3d(void)
|
|||
|
||||
while (!tilesizx[AIMED_SELOVR_PICNUM] || !tilesizy[AIMED_SELOVR_PICNUM] || j)
|
||||
{
|
||||
AIMED_SELOVR_PICNUM += i+MAXTILES;
|
||||
AIMED_SELOVR_PICNUM %= MAXTILES;
|
||||
i += AIMED_SELOVR_PICNUM + MAXTILES;
|
||||
AIMED_SELOVR_PICNUM = i % MAXTILES;
|
||||
j = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ static inline int32_t G_GetTeamPalette(int32_t team)
|
|||
{
|
||||
int8_t pal[] = { 3, 10, 11, 12 };
|
||||
|
||||
if (team > (int32_t)(sizeof(pal)/sizeof(pal[0])) || team < 0)
|
||||
if ((unsigned)team >= (sizeof(pal)/sizeof(pal[0])))
|
||||
return 0;
|
||||
|
||||
return pal[team];
|
||||
|
|
Loading…
Reference in a new issue