From e36d4c8c400596b2eb4c5e1945fbcaf0cdc084c9 Mon Sep 17 00:00:00 2001 From: Roel Messiant Date: Sun, 30 Sep 2012 22:25:26 +0000 Subject: [PATCH] [DISKPART] - Correct command processing following the first command in interactive mode. - Correct invocation of command-specific help functions. svn path=/trunk/; revision=57447 --- reactos/base/system/diskpart/help.c | 2 +- reactos/base/system/diskpart/interpreter.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/base/system/diskpart/help.c b/reactos/base/system/diskpart/help.c index 1ea344865ab..65dffd8aefd 100644 --- a/reactos/base/system/diskpart/help.c +++ b/reactos/base/system/diskpart/help.c @@ -84,7 +84,7 @@ BOOL help_main(INT argc, WCHAR **argv) /* Scan internal command table */ for (cmdptr = cmds; cmdptr->name; cmdptr++) { - if (_wcsicmp(argv[0], cmdptr->name) == 0 && cmdptr->help != NULL) + if (_wcsicmp(argv[1], cmdptr->name) == 0 && cmdptr->help != NULL) { cmdptr->help(argc, argv); return TRUE; diff --git a/reactos/base/system/diskpart/interpreter.c b/reactos/base/system/diskpart/interpreter.c index f8abe35944a..f27b8705697 100644 --- a/reactos/base/system/diskpart/interpreter.c +++ b/reactos/base/system/diskpart/interpreter.c @@ -156,6 +156,7 @@ InterpretMain(VOID) while (bRun == TRUE) { + args_count = 0; memset(args_vector, 0, sizeof(args_vector)); /* shown just before the input where the user places commands */