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:
Ozkan Sezer 2019-11-11 09:35:19 +00:00
parent 82289e3de7
commit da43c6a57b

View file

@ -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));