diff src/misc2.c @ 3156:4d4a328f199e v7.3.348

updated for version 7.3.348 Problem: "call range(1, 947948399)" causes a crash. (ZyX) Solution: Avoid a loop in the out of memory message.
author Bram Moolenaar <bram@vim.org>
date Wed, 26 Oct 2011 11:41:00 +0200
parents 6018c815e120
children e757e1127d21
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1012,8 +1012,12 @@ do_outofmem_msg(size)
     {
 	/* Don't hide this message */
 	emsg_silent = 0;
+
+	/* 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);
-	did_outofmem_msg = TRUE;
     }
 }