summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-04-24 20:11:20 +0000
committerBrian Paul <[email protected]>2002-04-24 20:11:20 +0000
commitdf7bd4bf11dfab769cab2043c53ca99a347ca1a5 (patch)
tree0451e941dd60e7d2ae5168c29956d207721623c2 /src
parentfb689193622362976c8e0fe3d85b8f52e6a34246 (diff)
test mapsize against 1, not 0 in glPixelMap()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/pixel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index c7667a28a1d..659797e55b5 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,10 +1,10 @@
-/* $Id: pixel.c,v 1.33 2001/12/18 04:06:45 brianp Exp $ */
+/* $Id: pixel.c,v 1.34 2002/04/24 20:11:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 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"),
@@ -251,12 +251,12 @@ _mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (mapsize<0 || mapsize>MAX_PIXEL_MAP_TABLE) {
+ if (mapsize < 1 || mapsize > MAX_PIXEL_MAP_TABLE) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" );
return;
}
- if (map>=GL_PIXEL_MAP_S_TO_S && map<=GL_PIXEL_MAP_I_TO_A) {
+ if (map >= GL_PIXEL_MAP_S_TO_S && map <= GL_PIXEL_MAP_I_TO_A) {
/* test that mapsize is a power of two */
if (_mesa_bitcount((GLuint) mapsize) != 1) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" );