uri decode: changed the test for the existence of the next character

Fix for 64b6eceaba1a4

More info here
https://github.com/azat/libevent/commit/64b6eceaba1a40ab0b175fa9fd9329d3e978ce6e#commitcomment-2714685