From e5c23adf73c28f86400729ddf90d01886ded3780 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 22 Jun 2021 22:39:02 +0200 Subject: [PATCH] Fix some ubsan warnings --- d3xp/SmokeParticles.cpp | 2 +- game/SmokeParticles.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d3xp/SmokeParticles.cpp b/d3xp/SmokeParticles.cpp index 710baec..4c63357 100644 --- a/d3xp/SmokeParticles.cpp +++ b/d3xp/SmokeParticles.cpp @@ -222,7 +222,7 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS int finalParticleTime = stage->cycleMsec * stage->spawnBunching; int deltaMsec = gameLocal.time - systemStartTime; - int nowCount, prevCount; + int nowCount=0, prevCount=0; if ( finalParticleTime == 0 ) { // if spawnBunching is 0, they will all come out at once if ( gameLocal.time == systemStartTime ) { diff --git a/game/SmokeParticles.cpp b/game/SmokeParticles.cpp index e63307d..b0867a7 100644 --- a/game/SmokeParticles.cpp +++ b/game/SmokeParticles.cpp @@ -207,7 +207,7 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS int finalParticleTime = stage->cycleMsec * stage->spawnBunching; int deltaMsec = gameLocal.time - systemStartTime; - int nowCount, prevCount; + int nowCount=0, prevCount=0; if ( finalParticleTime == 0 ) { // if spawnBunching is 0, they will all come out at once if ( gameLocal.time == systemStartTime ) {