From 80b926d24d7aff0b0135532828a7543964cdb92f Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 17 Nov 2017 18:53:37 +0100 Subject: [PATCH] Fix unsigned comparison --- ext/standard/filters.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/standard/filters.c b/ext/standard/filters.c index afdf74380b..3a9daf293e 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -822,7 +822,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins } } - if (lb_ptr >= lb_cnt && icnt <= 0) { + if (lb_ptr >= lb_cnt && icnt == 0) { break; } @@ -1028,7 +1028,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins for (;;) { switch (scan_stat) { case 0: { - if (icnt <= 0) { + if (icnt == 0) { goto out; } if (*ps == '=') { @@ -1045,7 +1045,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins } break; case 1: { - if (icnt <= 0) { + if (icnt == 0) { goto out; } if (*ps == ' ' || *ps == '\t') { @@ -1074,7 +1074,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins } /* break is missing intentionally */ case 2: { - if (icnt <= 0) { + if (icnt == 0) { goto out; } @@ -1101,7 +1101,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins } break; case 4: { - if (icnt <= 0) { + if (icnt == 0) { goto out; } if (lb_cnt < inst->lbchars_len && -- 2.50.1