From 3ecc9cc96d007106d462f6a96563c9fe410a9429 Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Sat, 14 Jan 2006 19:10:13 +0000 Subject: [PATCH] Slight fix for corner case cmd/cvar completion --- src/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keys.c b/src/keys.c index 0a8d7c5..8ab0276 100644 --- a/src/keys.c +++ b/src/keys.c @@ -182,7 +182,7 @@ void CompleteCommand(void){ cvar = Cvar_CompleteVariable(partial); //so try cvars if(cvar){ //found something - if(!strcmp(cvar, partial)) cmd = cvar; //exact cvar match + if(!cmd || !strcmp(cvar, partial)) cmd = cvar; //exact cvar match or no cmd else cmd = NULL; //no exact match, partial for both } }