aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-14 10:50:50 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-14 10:50:50 +0200
commit5ac77b889b243a6ee79f470538266e57c1ca6e03 (patch)
tree812a8503866f785cc92af465b901b77a14ee3665
parent7634df6dcc65f0ec83aabcefe6da34e5c4089bce (diff)
Switched to a while loop
-rw-r--r--FICS/talkproc.c6
1 files 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) {