diff -r db646b3c0b95 -r ec0afe1c6024 hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Wed Jan 09 19:10:11 2019 +0100 +++ b/hedgewars/uCommandHandlers.pas Wed Jan 09 19:39:48 2019 +0100 @@ -478,6 +478,11 @@ if CheckNoTeamOrHH then exit; + (* Use "~" (ASCII character 126) as synonym for NUL byte (=amNothing). + This is done to allow to add "setweap ~" in QTfrontend/binds.cpp because + the NUL byte would terminate the strings in C++ otherwise. *) + if (s[1] = '~') then + s[1]:= #0; if checkFails((s[0] = #1) and (s[1] <= char(High(TAmmoType))), 'Malformed /setweap', true) then exit; if not isExternalSource then