Browse Source

Fix 2 instances of void* pointer arithmetic

Partially reverts 341e440c07

Let's see if this fixes the windows build on travis
pull/2/head
Gleb Mazovetskiy 4 years ago committed by Alibek Omarov
parent
commit
36b32cad0f
  1. 2
      ref_gl/gl_dbghulls.c
  2. 2
      ref_gl/gl_sprite.c

2
ref_gl/gl_dbghulls.c

@ -17,7 +17,7 @@ GNU General Public License for more details. @@ -17,7 +17,7 @@ GNU General Public License for more details.
#include "mod_local.h"
#define list_entry( ptr, type, member ) \
((type *)((void *)(ptr) - (size_t)(&((type *)0)->member)))
((type *)((char *)(ptr) - (size_t)(&((type *)0)->member)))
// iterate over each entry in the list
#define list_for_each_entry( pos, head, member ) \

2
ref_gl/gl_sprite.c

@ -87,7 +87,7 @@ static const dframetype_t *R_SpriteLoadFrame( model_t *mod, const void *pin, msp @@ -87,7 +87,7 @@ static const dframetype_t *R_SpriteLoadFrame( model_t *mod, const void *pin, msp
pspriteframe->gl_texturenum = gl_texturenum;
*ppframe = pspriteframe;
return ( const dframetype_t* )(( const void* )pin + sizeof( dspriteframe_t ) + pinframe.width * pinframe.height * bytes );
return ( const dframetype_t* )(( const byte* )pin + sizeof( dspriteframe_t ) + pinframe.width * pinframe.height * bytes );
}
/*

Loading…
Cancel
Save