From 44467b5df9edad0c534138675e82f72ea8db002f Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 21 Nov 2016 07:08:43 -0300 Subject: [PATCH] test --- crypto777/iguana_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto777/iguana_utils.c b/crypto777/iguana_utils.c index b477880f8..700cd73cc 100755 --- a/crypto777/iguana_utils.c +++ b/crypto777/iguana_utils.c @@ -364,6 +364,8 @@ int32_t decode_hex(unsigned char *bytes,int32_t n,char *hex) memset(bytes,0,n); return(n); } + if ( hex[n-1] == '\n' || hex[n-1] == '\r' ) + hex[--n] = 0; if ( hex[n-1] == '\n' || hex[n-1] == '\r' ) hex[--n] = 0; if ( n == 0 || (hex[n*2+1] == 0 && hex[n*2] != 0) )