sim_hex: Only decrement maxlen in read_hex_string when a byte is added to the array

Without this fix, the output to the buffer would be limited to maxlen/2 bytes
instead of maxlen. It is obvious from the implementation that the latter
behavior is the expected one, so the function has been altered to reflect that.