mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 16:41:31 +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
|
** RE_BeginRegistration
|
||||||
*/
|
*/
|
||||||
void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
||||||
|
int i;
|
||||||
|
|
||||||
R_Init();
|
R_Init();
|
||||||
|
|
||||||
|
@ -1140,7 +1141,10 @@ void RE_BeginRegistration( glconfig_t *glconfigOut ) {
|
||||||
R_IssuePendingRenderCommands();
|
R_IssuePendingRenderCommands();
|
||||||
|
|
||||||
tr.visIndex = 0;
|
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();
|
R_ClearFlares();
|
||||||
RE_ClearScene();
|
RE_ClearScene();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue