From 662e6491eb593f1462be39e0004981d49cd859f9 Mon Sep 17 00:00:00 2001 From: Marcus Sundberg Date: Sat, 5 Feb 2000 16:01:15 +0000 Subject: [PATCH] Make sure we don't use a negative index into sb_faces. --- common/sbar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/sbar.c b/common/sbar.c index e1151a0..2329e85 100644 --- a/common/sbar.c +++ b/common/sbar.c @@ -1089,8 +1089,10 @@ void Sbar_DrawFace (void) if (cl.stats[STAT_HEALTH] >= 100) f = 4; - else + else { f = cl.stats[STAT_HEALTH] / 20; + if (f < 0) f = 0; + } if (cl.time <= cl.faceanimtime) {