diff --git a/Makefile b/Makefile index 4d726991d3..9de75e3464 100644 --- a/Makefile +++ b/Makefile @@ -115,6 +115,7 @@ MINOR = 1 # - With these features: "make depend" (works best with gcc). # - If you have a lint program: "make lint" and check the output (ignore GTK # warnings). +# - compile release versions using -DNDEBUG to disable assert()s # - If you have valgrind, enable it in src/testdir/Makefile and run "make # test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms. # Check the valgrind output. diff --git a/src/highlight.c b/src/highlight.c index 807753a303..ec3d11568c 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -3689,6 +3689,8 @@ syn_id2attr(int hl_id) hl_group_T *sgp; hl_id = syn_get_final_id(hl_id); + // shouldn't happen + assert(hl_id > 0); sgp = &HL_TABLE()[hl_id - 1]; // index is ID minus one #ifdef FEAT_GUI @@ -3716,6 +3718,8 @@ syn_id2colors(int hl_id, guicolor_T *fgp, guicolor_T *bgp) hl_group_T *sgp; hl_id = syn_get_final_id(hl_id); + // shouldn't happen + assert(hl_id > 0); sgp = &HL_TABLE()[hl_id - 1]; // index is ID minus one *fgp = sgp->sg_gui_fg; @@ -3734,6 +3738,8 @@ syn_id2cterm_bg(int hl_id, int *fgp, int *bgp) hl_group_T *sgp; hl_id = syn_get_final_id(hl_id); + // shouldn't happen + assert(hl_id > 0); sgp = &HL_TABLE()[hl_id - 1]; // index is ID minus one *fgp = sgp->sg_cterm_fg - 1; *bgp = sgp->sg_cterm_bg - 1; diff --git a/src/version.c b/src/version.c index 04c11f76ce..8b4f3e7637 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1469, /**/ 1468, /**/