From 3d8d13f0a70cefc1b12571b7f6aa2d1d4c58cffb Mon Sep 17 00:00:00 2001 From: Shane Garrett Date: Tue, 27 Mar 2018 14:47:30 -0400 Subject: debugserver: Fix argv encoding The encoding of the "A" command in idevicedebug had issues when encoding a character with a value > 0x7F such as some UTF-8 characters. --- src/debugserver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugserver.c b/src/debugserver.c index ceaf4a9..c517017 100644 --- a/src/debugserver.c +++ b/src/debugserver.c @@ -599,8 +599,8 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_argv(debugserver char *p = m; char *q = (char*)argv[i]; while (*q) { - *p++ = debugserver_int2hex(*q >> 4); - *p++ = debugserver_int2hex(*q & 0xf); + *p++ = DEBUGSERVER_HEX_ENCODE_FIRST_BYTE(*q); + *p++ = DEBUGSERVER_HEX_ENCODE_SECOND_BYTE(*q); q++; } -- cgit v1.1-32-gdbae