From 95e5aa1cec5dc79f0ec718149fc35974c228135a Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 23 Apr 2017 13:29:29 +1000 Subject: [PATCH] more debugging --- doors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doors.c b/doors.c index 012b0cd..627bd06 100644 --- a/doors.c +++ b/doors.c @@ -324,7 +324,7 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c ptr2p = ptr2; memset(ptr2, 0, (g + 1) * 2); inc = g; - ouc = g * 2; + ouc = (g + 1) * 2; iconv(ic, &ptr1, &inc, &ptr2, &ouc); write(master, ptr2p, ptr2 - ptr2p); @@ -359,7 +359,7 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c ptr2p = ptr2; memset(ptr2, 0, (g + 1) * 2); inc = g; - ouc = g * 2; + ouc = (g + 1) * 2; sz = iconv(ic, &ptr1, &inc, &ptr2, &ouc); if (sz == -1) {