diff src/vim9execute.c @ 19342:8ff84bc1c89b v8.2.0229

patch 8.2.0229: compare instructions not tested Commit: https://github.com/vim/vim/commit/f2460a3aec89e70d4bab8d2369ee3f78cc43f09a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 7 22:09:54 2020 +0100 patch 8.2.0229: compare instructions not tested Problem: Compare instructions not tested. Solution: Add test cases. Fix disassemble with line continuation.
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Feb 2020 22:15:03 +0100
parents 61646c189622
children e4b326c9424a
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1622,6 +1622,7 @@ ex_disassemble(exarg_T *eap)
     for (current = 0; current < dfunc->df_instr_count; ++current)
     {
 	isn_T	    *iptr = &instr[current];
+	char	    *line;
 
 	while (line_idx < iptr->isn_lnum && line_idx < ufunc->uf_lines.ga_len)
 	{
@@ -1630,7 +1631,9 @@ ex_disassemble(exarg_T *eap)
 		msg_puts("\n\n");
 		prev_current = current;
 	    }
-	    msg(((char **)ufunc->uf_lines.ga_data)[line_idx++]);
+	    line = ((char **)ufunc->uf_lines.ga_data)[line_idx++];
+	    if (line != NULL)
+		msg(line);
 	}
 
 	switch (iptr->isn_type)