File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6055,7 +6055,15 @@ ex_execute(exarg_T *eap)
60556055 char_u buf [NUMBUFLEN ];
60566056
60576057 if (eap -> cmdidx == CMD_execute )
6058- p = tv_get_string_buf (& rettv , buf );
6058+ {
6059+ if (rettv .v_type == VAR_CHANNEL || rettv .v_type == VAR_JOB )
6060+ {
6061+ emsg (_ (e_inval_string ));
6062+ p = NULL ;
6063+ }
6064+ else
6065+ p = tv_get_string_buf (& rettv , buf );
6066+ }
60596067 else
60606068 p = tv_stringify (& rettv , buf );
60616069 if (p == NULL )
Original file line number Diff line number Diff line change @@ -216,3 +216,15 @@ func Test_scriptversion_fail()
216216 call assert_fails (' source Xversionscript' , ' E999:' )
217217 call delete (' Xversionscript' )
218218endfunc
219+
220+ func Test_excute_null ()
221+ call assert_fails (' execute test_null_list()' , ' E730:' )
222+ call assert_fails (' execute test_null_dict()' , ' E731:' )
223+ call assert_fails (' execute test_null_blob()' , ' E976:' )
224+ execute test_null_string ()
225+ call assert_fails (' execute test_null_partial()' , ' E729:' )
226+ if has (' job' )
227+ call assert_fails (' execute test_null_job()' , ' E908:' )
228+ call assert_fails (' execute test_null_channel()' , ' E908:' )
229+ endif
230+ endfunc
Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ static char *(features[]) =
742742
743743static int included_patches [] =
744744{ /* Add new patch number below this line */
745+ /**/
746+ 104 ,
745747/**/
746748 103 ,
747749/**/
You can’t perform that action at this time.
0 commit comments