From 97e9f1ee7533b8e38322eb4888eae1353b74c47d Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 10 Apr 2019 01:00:24 +0000 Subject: [PATCH] SW: Fix -Warray-bounds git-svn-id: https://svn.eduke32.com/eduke32@7554 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/ripper2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/sw/src/ripper2.cpp b/source/sw/src/ripper2.cpp index 03329e0ce..99b6296a2 100644 --- a/source/sw/src/ripper2.cpp +++ b/source/sw/src/ripper2.cpp @@ -1264,7 +1264,9 @@ void Ripper2Hatch(short Weapon) short rip_ang[MAX_RIPPER2S]; rip_ang[0] = RANDOM_P2(2048); +#if MAX_RIPPER2S > 1 rip_ang[1] = NORM_ANGLE(rip_ang[0] + 1024 + (RANDOM_P2(512) - 256)); +#endif for (i = 0; i < MAX_RIPPER2S; i++) {