mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 20:11:42 +00:00
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:
parent
d130c42172
commit
57ad299dfa
1 changed files with 2 additions and 2 deletions
|
@ -724,9 +724,9 @@ int AllocBlock (int w, int h, int *x, int *y)
|
||||||
if (texnum == lightmap_count)
|
if (texnum == lightmap_count)
|
||||||
{
|
{
|
||||||
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]));
|
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.
|
//as we're only tracking one texture, we don't need multiple copies of allocated any more.
|
||||||
memset(allocated, 0, sizeof(allocated));
|
memset(allocated, 0, sizeof(allocated));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue