From 10bc57c164e87ebe1fb3465ad9849f6cce2ddfb1 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 23 Apr 2017 13:16:34 +1000 Subject: [PATCH] around the wrong way? --- doors.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doors.c b/doors.c index 213984b..d9b3802 100644 --- a/doors.c +++ b/doors.c @@ -314,9 +314,9 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c write(master, outbuf, g); } else { if (user->codepage == 0) { - ic = iconv_open("CP437", codepage); + ic = iconv_open(codepage, "CP437"); } else { - ic = iconv_open("UTF-8", codepage); + ic = iconv_open(codepage, "UTF-8"); } ptr1 = outbuf; ptr2 = (char *)malloc((g + 1) * 2); @@ -349,9 +349,9 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c write(door_out, outbuf, g); } else { if (user->codepage == 0) { - ic = iconv_open(codepage, "CP437"); + ic = iconv_open("CP437", codepage); } else { - ic = iconv_open(codepage, "UTF-8"); + ic = iconv_open("UTF-8", codepage); } ptr1 = outbuf; ptr2 = (char *)malloc((g + 1) * 2);