diff --git a/Makefile.linux b/Makefile.linux index 71ff5c1..5d8de24 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -35,7 +35,7 @@ OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o $(CC) -c -o $@ $< $(CFLAGS) magicka: $(OBJ) ${LUA} ${ZMODEM} ${JAMLIB} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh magimail: $(JAMLIB) cd utils/magimail && $(MAKE) linux diff --git a/Makefile.linux.WWW b/Makefile.linux.WWW index d868726..cbefdfd 100644 --- a/Makefile.linux.WWW +++ b/Makefile.linux.WWW @@ -39,7 +39,7 @@ OBJ = deps/aha/aha.o inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o do $(CC) -c -o $@ $< $(CFLAGS) magicka: $(OBJ) ${LUA} ${JAMLIB} ${ZMODEM} ${B64} ${JSMN} - $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh -liconv $(MICROHTTPD) + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD) magimail: $(JAMLIB) cd utils/magimail && $(MAKE) linux diff --git a/bbs.c b/bbs.c index 2c387ae..8fa61c2 100644 --- a/bbs.c +++ b/bbs.c @@ -246,7 +246,7 @@ void s_putchar(char c) { if (sshBBS) { fprintf(stdout, "%s", ptr1); } else { - write(gSocket, ptr1, strlen(ptr1)); + write(gSocket, ptr1, outbuf - ptr1); } iconv_close(ic); free(ptr1); @@ -282,7 +282,7 @@ void s_putstring(char *c) { if (sshBBS) { fprintf(stdout, "%s", ptr1); } else { - write(gSocket, ptr1, strlen(ptr1)); + write(gSocket, ptr1, outbuf - ptr1); } iconv_close(ic); free(ptr1);