summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-10-26 11:41:00 +0200
committerBram Moolenaar <Bram@vim.org>2011-10-26 11:41:00 +0200
commit79739e163ba7f4b8fe1ad8374d24521b2e595331 (patch)
treeb144e97cc42ef4ac48024c83a27616375c42259f /src/misc2.c
parentb931d74b060461c47008aba7b3eb6a9ab1471c69 (diff)
downloadvim-git-79739e163ba7f4b8fe1ad8374d24521b2e595331.tar.gz
updated for version 7.3.348v7.3.348
Problem: "call range(1, 947948399)" causes a crash. (ZyX) Solution: Avoid a loop in the out of memory message.
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 4c05a8cb8..20ee1701b 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1012,8 +1012,12 @@ do_outofmem_msg(size)
{
/* Don't hide this message */
emsg_silent = 0;
- EMSGN(_("E342: Out of memory! (allocating %lu bytes)"), size);
+
+ /* Must come first to avoid coming back here when printing the error
+ * message fails, e.g. when setting v:errmsg. */
did_outofmem_msg = TRUE;
+
+ EMSGN(_("E342: Out of memory! (allocating %lu bytes)"), size);
}
}