From cc2dc6c85e7657583149f9b5021003b53e56ec4b Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 21 Feb 2004 16:49:39 +0000 Subject: [PATCH] Set correct default threshold for image2wbmp(). --- ext/gd/gd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 1ce674e2d5..3065fd81b2 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1723,6 +1723,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char case PHP_GDIMG_CONVERT_WBM: if (q < 0 || q > 255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); + q = 0; } gdImageWBMP(im, q, fp); break; -- 2.50.1