[DISKPART] Don't crash on input if user provided no command
authorPierre Schweitzer <pierre@reactos.org>
Wed, 3 Jan 2018 07:47:36 +0000 (08:47 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 3 Jan 2018 07:48:36 +0000 (08:48 +0100)
CORE-14018

base/system/diskpart/interpreter.c

index 4e22a6d..59f7557 100644 (file)
@@ -69,6 +69,10 @@ InterpretCmd(int argc, LPWSTR *argv)
 {
     PCOMMAND cmdptr;
 
+    /* If no args provided */
+    if (argc < 1)
+        return TRUE;
+
     /* First, determine if the user wants to exit
        or to use a comment */
     if(wcsicmp(argv[0], L"exit") == 0)