summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-07-28 21:04:21 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-07-28 21:04:21 +0000
commit3670e206a76d3c197bdfab8293e48623a87c7827 (patch)
treef1a9ad1a02dfbbe9c6f1f9fb26ed2015f7f4fca0 /src/mesa/tnl
parent46af1f87c897ef03470d205e9fd147e93911cbce (diff)
Fix core in fixup_normal_lengths
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_imm_dlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index 4a055b2d87b..b2b7f90c495 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_dlist.c,v 1.26 2001/07/27 19:09:58 brianp Exp $ */
+/* $Id: t_imm_dlist.c,v 1.27 2001/07/28 21:04:21 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -107,9 +107,11 @@ static void fixup_normal_lengths( struct immediate *IM )
dest[i] = len;
}
- while (!(flags[i] & (VERT_NORM|VERT_END_VB))) {
- dest[i] = len;
- i++;
+ if (i < IM->Count) {
+ while (!(flags[i] & (VERT_NORM|VERT_END_VB))) {
+ dest[i] = len;
+ i++;
+ }
}
}