Author: janderwald
Date: Fri Mar 18 16:28:21 2011
New Revision: 51087
URL:
http://svn.reactos.org/svn/reactos?rev=51087&view=rev
Log:
[Y]
- Fix argument checking
- Close correct handle
- Patch by Kuts Alexey
- bug 6004
Modified:
trunk/rosapps/applications/cmdutils/y/y.c
Modified: trunk/rosapps/applications/cmdutils/y/y.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/y/y.…
==============================================================================
--- trunk/rosapps/applications/cmdutils/y/y.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/y/y.c [iso-8859-1] Fri Mar 18 16:28:21 2011
@@ -53,7 +53,7 @@
hConsoleIn = GetStdHandle(STD_INPUT_HANDLE);
hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
- if (_tcsncmp (argv[1], _T("/?"), 2) == 0)
+ if (argc == 2 && _tcsncmp (argv[1], _T("/?"), 2) == 0)
{
ConOutPuts(_T("copy stdin to stdout and then files to stdout\n"
"\n"
@@ -115,7 +115,7 @@
}
while(FindNextFile(hFind,&FindData));
- FindClose(hFile);
+ FindClose(hFind);
}
return 0;