mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
Don't use memset with non-zero value to fill ints
Coverity reported using value -2 as a bad memset. Really doesn't make sense when filling ints and not bytes too.
This commit is contained in:
parent
9d74227559
commit
e21ff01946
1 changed files with 5 additions and 1 deletions
|
@ -1132,6 +1132,7 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
|
|||
** RE_BeginRegistration
|
||||
*/
|
||||
void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
||||
int i;
|
||||
|
||||
R_Init();
|
||||
|
||||
|
@ -1140,7 +1141,10 @@ void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
|||
R_IssuePendingRenderCommands();
|
||||
|
||||
tr.visIndex = 0;
|
||||
memset(tr.visClusters, -2, sizeof(tr.visClusters)); // force markleafs to regenerate
|
||||
// force markleafs to regenerate
|
||||
for(i = 0; i < MAX_VISCOUNTS; i++) {
|
||||
tr.visClusters[i] = -2;
|
||||
}
|
||||
|
||||
R_ClearFlares();
|
||||
RE_ClearScene();
|
||||
|
|
Loading…
Reference in a new issue