summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-19 11:38:02 -0600
committerBrian Paul <brianp@vmware.com>2011-09-19 11:39:30 -0600
commit2ce8c3553b5f7b97b110ff7d968411027c156552 (patch)
tree769314c433529f7ec16e1069b1ebfcdf00ee01d4 /src/mesa/main/dlist.c
parent20da49b2677fcf6a721b8a46e037a01e842fee61 (diff)
downloadexternal_mesa3d-2ce8c3553b5f7b97b110ff7d968411027c156552.zip
external_mesa3d-2ce8c3553b5f7b97b110ff7d968411027c156552.tar.gz
external_mesa3d-2ce8c3553b5f7b97b110ff7d968411027c156552.tar.bz2
mesa: fix format/type check in unpack_image() for bitmaps
Passing type == GL_BITMAP returns 0 while error values return -1. This fixes glPolygonStipple being compiled into display lists.
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 2b2ff90..e8f8fe2 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -887,7 +887,7 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
return NULL;
}
- if (_mesa_bytes_per_pixel(format, type) <= 0) {
+ if (_mesa_bytes_per_pixel(format, type) < 0) {
/* bad format and/or type */
return NULL;
}