--- 1141pr/src/plugin/commands/comcom.c 2002-12-21 01:27:13.000000000 +0000 +++ comhack/src/plugin/commands/comcom.c 2003-01-11 19:05:10.000000000 +0000 @@ -1016,10 +1016,20 @@ int i; if ((len >4) && (file[len-4] == '.')) { - for (i=0; i<3; i++) - if (!strncasecmp(file+len-3, extlist[i], 3)) - if (com_exist_file(file)) return i+1; - return 0; + /* '..\ws' does _not_ mean a file with extension '\ws' */ + boolean isext = TRUE; + for (i = len - 3; i < len; i++) { + if (!isalnum (file[i])) { + isext = FALSE; + break; + } + } + if (isext) { + for (i=0; i<3; i++) + if (!strncasecmp(file+len-3, extlist[i], 3)) + if (com_exist_file(file)) return i+1; + return 0; + } } *p++ = '.'; for (i=0; i<3; i++) { @@ -1164,7 +1175,7 @@ char *p; if (!expand || (expand && com_doscanonicalize(buf, path))) - strcpy(buf, path); + strcpy(buf, path); p = basename_of(buf,0); *p = 0; return p - buf;