summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-02 18:23:31 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-02 18:23:31 +0000
commit7d1cbac459a7ee6713da2d58204878baccebbca6 (patch)
tree9857f1e948513c2e9c104144c0b12d199948cde8 /src
parentb9cfabc419ab3424f09983d67ae17cfa68bb988f (diff)
downloadirssi-7d1cbac459a7ee6713da2d58204878baccebbca6.zip
Fixed a couple of potential problems if there was longer lines than 64k
in help files, autorun file or /catted file. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@417 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/autorun.c2
-rw-r--r--src/fe-common/core/fe-core-commands.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/core/autorun.c b/src/fe-common/core/autorun.c
index 506e45ff..ade54188 100644
--- a/src/fe-common/core/autorun.c
+++ b/src/fe-common/core/autorun.c
@@ -45,7 +45,7 @@ static void sig_autorun(void)
ret = line_split(tmpbuf, recvlen, &str, &buffer);
if (ret > 0) eval_special_string(str, "", active_win->active_server, active_win->active);
- } while (ret > 0);
+ } while (ret >= 0);
line_split_free(buffer);
close(f);
diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c
index 39580adf..36517bc2 100644
--- a/src/fe-common/core/fe-core-commands.c
+++ b/src/fe-common/core/fe-core-commands.c
@@ -127,7 +127,7 @@ static int show_help(COMMAND_REC *cmd)
ret = line_split(tmpbuf, recvlen, &str, &buffer);
if (ret > 0) printtext(NULL, NULL, MSGLEVEL_NEVER, str);
}
- while (ret > 0);
+ while (ret >= 0);
line_split_free(buffer);
close(f);
@@ -264,7 +264,7 @@ static void cmd_cat(const char *data)
ret = line_split(tmpbuf, recvlen, &str, &buffer);
if (ret > 0) printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP, "%s", str);
- } while (ret > 0);
+ } while (ret >= 0);
line_split_free(buffer);
close(f);