diff options
Diffstat (limited to 'src/microhttpd/test_str_bin_hex.c')
-rw-r--r-- | src/microhttpd/test_str_bin_hex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/test_str_bin_hex.c b/src/microhttpd/test_str_bin_hex.c index 557146eb..7bb7f989 100644 --- a/src/microhttpd/test_str_bin_hex.c +++ b/src/microhttpd/test_str_bin_hex.c | |||
@@ -137,11 +137,12 @@ expect_decoded_n (const char *const hex, const size_t hex_len, | |||
137 | "Wrong output data:\n"); | 137 | "Wrong output data:\n"); |
138 | } | 138 | } |
139 | } | 139 | } |
140 | if (fill_chr != buf[res_size]) | 140 | if (((0 == res_size) && (fill_chr != buf[bin_size])) |
141 | || ((0 != res_size) && (fill_chr != buf[res_size]))) | ||
141 | { | 142 | { |
142 | check_res = 1; | 143 | check_res = 1; |
143 | fprintf (stderr, | 144 | fprintf (stderr, |
144 | "'MHD_str_pct_decode_strict_n_ ()' FAILED: " | 145 | "'MHD_hex_to_bin ()' FAILED: " |
145 | "A char written outside the buffer:\n"); | 146 | "A char written outside the buffer:\n"); |
146 | } | 147 | } |
147 | if (0 != check_res) | 148 | if (0 != check_res) |