From 5ac77b889b243a6ee79f470538266e57c1ca6e03 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 14 Apr 2024 10:50:50 +0200 Subject: Switched to a while loop --- FICS/talkproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FICS/talkproc.c b/FICS/talkproc.c index 65a575b..e289b14 100644 --- a/FICS/talkproc.c +++ b/FICS/talkproc.c @@ -825,7 +825,9 @@ com_qtell(int p, param_list param) sprintf(tmp, "%s", param[1].val.string); - for (i = 0, count = 0; ((tmp[i] != '\0') && (count < 1029));) { + count = 0; + i = 0; + while (tmp[i] != '\0' && count < 1029) { if (tmp[i] == '\\' && tmp[i + 1] == 'n') { strcat(buffer1, "\n:"); strcat(buffer2, "\n:"); @@ -864,7 +866,7 @@ com_qtell(int p, param_list param) count++; i++; } - } + } // while if (param[0].type == TYPE_WORD) { if ((p1 = player_find_bylogin(param[0].val.word)) < 0) { -- cgit v1.2.3