static analyzer bit for ball.c

src/ball.c(50): warning C6011: Dereferencing NULL pointer 'uball'.
This commit is contained in:
nhmall
2023-12-23 23:14:17 -05:00
parent 93bcfeac29
commit 9b7694d2c5
+1 -1
View File
@@ -44,7 +44,7 @@ ballfall(void)
{ {
boolean gets_hit; boolean gets_hit;
if (uball && carried(uball) && welded(uball)) if (!uball || (uball && carried(uball) && welded(uball)))
return; return;
gets_hit = (((uball->ox != u.ux) || (uball->oy != u.uy)) gets_hit = (((uball->ox != u.ux) || (uball->oy != u.uy))