]> granicus.if.org Git - php/commitdiff
Set correct default threshold for image2wbmp().
authorIlia Alshanetsky <iliaa@php.net>
Sat, 21 Feb 2004 16:49:39 +0000 (16:49 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 21 Feb 2004 16:49:39 +0000 (16:49 +0000)
ext/gd/gd.c

index 1ce674e2d5614ca0dbc3d93304f91b0135d0f6e8..3065fd81b21480a959cf4fdfc7ee66b924e6b52e 100644 (file)
@@ -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;