mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
r_brush.c (AllocBlock): add a FIXME note about a valgrind warning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1645 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
82289e3de7
commit
da43c6a57b
1 changed files with 2 additions and 0 deletions
|
@ -726,6 +726,8 @@ int AllocBlock (int w, int h, int *x, int *y)
|
|||
lightmap_count++;
|
||||
lightmap = (struct lightmap_s *) realloc(lightmap, sizeof(*lightmap)*lightmap_count);
|
||||
memset(&lightmap[texnum], 0, sizeof(lightmap[texnum]));
|
||||
/* FIXME: we leave 'gaps' in malloc()ed data, CRC_Block() later accesses
|
||||
* that uninitialized data and valgrind complains for it. use calloc() ? */
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue