summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-07-18 03:50:16 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-07-18 03:50:16 +0000
commitb0c18181e5a9c3538305ead8effad66382480ec0 (patch)
treefb0b37eed13554d61b6ad4eec698a94e9bf743e8
parent19f87266b1621d1ce5836ed498624cce4fd0a0d0 (diff)
clamp max in GL_RETURN setup
-rw-r--r--src/mesa/main/accum.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index e44287e04f..63328ee311 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,10 +1,10 @@
-/* $Id: accum.c,v 1.10.2.3 2000/06/19 00:45:17 brianp Exp $ */
+/* $Id: accum.c,v 1.10.2.4 2000/07/18 03:50:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.2.1
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -347,9 +347,8 @@ void gl_Accum( GLcontext *ctx, GLenum op, GLfloat value )
static GLchan multTable[32768];
static GLfloat prevMult = 0.0;
GLuint j;
- const GLint max = (GLint) (256 / mult);
+ const GLint max = MIN2((GLint) (256 / mult), 32767);
if (mult != prevMult) {
- assert(max <= 32768);
for (j = 0; j < max; j++)
multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
prevMult = mult;