]> granicus.if.org Git - php/commitdiff
Fixed condition
authorDmitry Stogov <dmitry@zend.com>
Fri, 29 Apr 2016 09:49:41 +0000 (12:49 +0300)
committerDmitry Stogov <dmitry@zend.com>
Fri, 29 Apr 2016 09:49:41 +0000 (12:49 +0300)
sapi/cli/php_cli.c

index 5d789d2626de264a960362a34bee2dfee54ac8cf..dffb57264cda006f8bff6b8422d99949d78c30c7 100644 (file)
@@ -304,7 +304,7 @@ static size_t sapi_cli_ub_write(const char *str, size_t str_length) /* {{{ */
        if (cli_shell_callbacks.cli_shell_ub_write) {
                size_t ub_wrote;
                ub_wrote = cli_shell_callbacks.cli_shell_ub_write(str, str_length);
-               if (ub_wrote -1) {
+               if (ub_wrote != (size_t)-1) {
                        return ub_wrote;
                }
        }