mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:9.0.0386: some code blocks are nested too deep
Problem: Some code blocks are nested too deep.
Solution: Bail out earlier. (Yegappan Lakshmanan, closes vim/vim#11058)
b1f471ee20
This commit is contained in:
@@ -506,16 +506,18 @@ bool striequal(const char *a, const char *b)
|
||||
// Did_outofmem_msg is reset when a character is read.
|
||||
void do_outofmem_msg(size_t size)
|
||||
{
|
||||
if (!did_outofmem_msg) {
|
||||
// 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;
|
||||
|
||||
semsg(_("E342: Out of memory! (allocating %" PRIu64 " bytes)"), (uint64_t)size);
|
||||
if (did_outofmem_msg) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
semsg(_("E342: Out of memory! (allocating %" PRIu64 " bytes)"), (uint64_t)size);
|
||||
}
|
||||
|
||||
/// Writes time_t to "buf[8]".
|
||||
|
Reference in New Issue
Block a user