https://git.reactos.org/?p=reactos.git;a=commitdiff;h=14a05528d0f3bfb96160e…
commit 14a05528d0f3bfb96160ea7eafd2f9328a78fc4c
Author: Ged Murphy <gedmurphy(a)reactos.org>
AuthorDate: Sun Nov 11 15:02:34 2018 +0000
Commit: Ged Murphy <gedmurphy(a)reactos.org>
CommitDate: Sun Nov 11 17:58:38 2018 +0000
[FLTMC] Fix output when no args are shown
---
base/applications/fltmc/fltmc.cpp | 33 ++++++++++++++-------------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/base/applications/fltmc/fltmc.cpp b/base/applications/fltmc/fltmc.cpp
index 9a19df5f81..7d9f052148 100644
--- a/base/applications/fltmc/fltmc.cpp
+++ b/base/applications/fltmc/fltmc.cpp
@@ -245,15 +245,21 @@ ListFilters()
int wmain(int argc, WCHAR *argv[])
{
- if (argc < 2)
- {
- LoadAndPrintString(IDS_USAGE);
- return 0;
- }
-
wprintf(L"\n");
- if (!_wcsicmp(argv[1], L"help"))
+ if ((argc < 2) || (!_wcsicmp(argv[1], L"filters")))
+ {
+ if (argc < 3)
+ {
+ ListFilters();
+ }
+ else
+ {
+ LoadAndPrintString(IDS_USAGE_FILTERS);
+ wprintf(L"fltmc.exe filters\n\n");
+ }
+ }
+ else if (!_wcsicmp(argv[1], L"help"))
{
LoadAndPrintString(IDS_USAGE);
}
@@ -281,18 +287,7 @@ int wmain(int argc, WCHAR *argv[])
wprintf(L"fltmc.exe unload [name]\n\n");
}
}
- else if (!_wcsicmp(argv[1], L"filters"))
- {
- if (argc == 2)
- {
- ListFilters();
- }
- else
- {
- LoadAndPrintString(IDS_USAGE_FILTERS);
- wprintf(L"fltmc.exe filters\n\n");
- }
- }
+ else
return 0;
}