1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector (Tietew <tietew@tietew.net>'s patch).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2001-09-25 01:47:47 +00:00
parent c5da55fbdd
commit 906d9cc83b
2 changed files with 19 additions and 12 deletions

View file

@ -1,3 +1,8 @@
Tue Sep 25 10:46:42 2001 Usaku Nakamura <usa@ruby-lang.org>
* win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector
(Tietew <tietew@tietew.net>'s patch).
Thu Sep 20 21:25:00 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp> Thu Sep 20 21:25:00 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* eval.c (MATCH_DATA): access via rb_svar(). * eval.c (MATCH_DATA): access via rb_svar().

View file

@ -367,20 +367,22 @@ static char *szInternalCmds[] = {
int int
isInternalCmd(char *cmd) isInternalCmd(char *cmd)
{ {
int i, fRet=0; int i, fRet=0;
char **vec; char **vec;
int vecc = NtMakeCmdVector(cmd, &vec, FALSE); int vecc = NtMakeCmdVector(cmd, &vec, FALSE);
for( i = 0; szInternalCmds[i] ; i++){ if (vecc == 0)
if(!strcasecmp(szInternalCmds[i], vec[0])){ return 0;
fRet = 1; for( i = 0; szInternalCmds[i] ; i++){
break; if(!strcasecmp(szInternalCmds[i], vec[0])){
} fRet = 1;
} break;
}
SafeFree (vec, vecc); }
return fRet; SafeFree(vec, vecc);
return fRet;
} }