From 14a05528d0f3bfb96160ea7eafd2f9328a78fc4c Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Sun, 11 Nov 2018 15:02:34 +0000 Subject: [PATCH] [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 9a19df5f81f..7d9f0521483 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; }