engine: common: fix char array underflow, on Q_strlen() - 1

This commit is contained in:
Alibek Omarov
2026-04-05 05:44:18 +05:00
parent 3ace4a61d2
commit c8693e1e89

View File

@@ -1199,6 +1199,9 @@ void Con_CompleteCommand( field_t *field, qboolean print_suggestions )
// setup the completion field
con.completionField = field;
if( COM_StringEmpty( con.completionField->buffer ))
return;
// only look at the first token for completion purposes
Cmd_TokenizeString( con.completionField->buffer );