--- src/mesa/main/image.c 2006-11-16 09:40:38.000000000 +0800 +++ src/mesa/main/image.c.new 2006-11-16 09:40:27.000000000 +0800 @@ -4173,7 +4173,7 @@ if (width <= 0 || height <= 0 || depth <= 0) return NULL; /* generate error later */ - if (format == GL_BITMAP) { + if (type == GL_BITMAP) { bytesPerRow = (width + 7) >> 3; flipBytes = !unpack->LsbFirst; swap2 = swap4 = GL_FALSE;