r_brush.c (AllocBlock): add casts to malloc and realloc

( in case someone wants to build using C++ compilers. )

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1634 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2019-09-16 11:00:38 +00:00
parent d130c42172
commit 57ad299dfa
1 changed files with 2 additions and 2 deletions

View File

@ -724,9 +724,9 @@ int AllocBlock (int w, int h, int *x, int *y)
if (texnum == lightmap_count)
{
lightmap_count++;
lightmap = realloc(lightmap, sizeof(*lightmap)*lightmap_count);
lightmap = (struct lightmap_s *) realloc(lightmap, sizeof(*lightmap)*lightmap_count);
memset(&lightmap[texnum], 0, sizeof(lightmap[texnum]));
lightmap[texnum].data = malloc(4*LMBLOCK_WIDTH*LMBLOCK_HEIGHT);
lightmap[texnum].data = (byte *) malloc(4*LMBLOCK_WIDTH*LMBLOCK_HEIGHT);
//as we're only tracking one texture, we don't need multiple copies of allocated any more.
memset(allocated, 0, sizeof(allocated));
}