patch 9.0.1143: invalid memory access with bad 'statusline' value

Problem:    Invalid memory access with bad 'statusline' value.
Solution:   Avoid going over the NUL at the end.
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index a829597..23613bf 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -440,6 +440,13 @@
   set splitbelow&
 endfunc
 
+func Test_statusline_trailing_percent_zero()
+  " this was causing illegal memory access
+  set laststatus=2 stl=%!%0
+  call assert_fails('redraw', 'E15: Invalid expression: "%0"')
+  set laststatus& stl&
+endfunc
+
 func Test_statusline_visual()
   func CallWordcount()
     call wordcount()