Mercurial > vim
changeset 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 | 7d7f4862832e |
children | 453324d06809 |
files | src/misc2.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
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; } }