summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-07-07 17:36:56 +0200
committerBram Moolenaar <Bram@vim.org>2011-07-07 17:36:56 +0200
commitf56a6de10b5d2b5c3f38753fdae9d7fd82b58c73 (patch)
tree4e8cdb00b46695a61a9e0fefd41abe9d00c17a1d /src/eval.c
parentb5ce04dd281d2923693255a1f565d2170c2ca504 (diff)
downloadvim-f56a6de10b5d2b5c3f38753fdae9d7fd82b58c73.zip
updated for version 7.3.243
Problem: Illegal memory access in readline(). Solution: Swap the conditions. (Dominique Pelle)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index e11170736..0ee5b7a0e 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14318,7 +14318,7 @@ f_readfile(argvars, rettv)
tolist = 0;
for ( ; filtd < buflen || readlen <= 0; ++filtd)
{
- if (buf[filtd] == '\n' || readlen <= 0)
+ if (readlen <= 0 || buf[filtd] == '\n')
{
/* In binary mode add an empty list item when the last
* non-empty line ends in a '\n'. */