patch 8.0.0307: asan detects a memory error when EXITFREE is defined
Problem: Asan detects a memory error when EXITFREE is defined. (Dominique
Pelle)
Solution: In getvcol() check for ml_get_buf() returning an empty string.
Also skip adjusting the scroll position. Set "exiting" in
mch_exit() for all systems.
diff --git a/src/os_win32.c b/src/os_win32.c
index d35061f..adbb199 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2538,8 +2538,9 @@
void
mch_exit(int r)
{
- stoptermcap();
+ exiting = TRUE;
+ stoptermcap();
if (g_fWindInitCalled)
settmode(TMODE_COOK);