Skip to content

Commit

Permalink
added missing prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanide0081 committed Jan 26, 2023
1 parent d7a6cb2 commit 352edc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "functions.h"

void printError(const wchar_t *msg) {
fwprintf(stderr, L"%lsERROR: %ls%ls%ls\n", CHARCOLOR_RED, CHARCOLOR_WHITE, msg, COLOR_DEFAULT);
fwprintf(stderr, L"%lsERROR: %ls%ls%ls\n\n", CHARCOLOR_RED, CHARCOLOR_WHITE, msg, COLOR_DEFAULT);
}

wchar_t **parseArguments(int count, const wchar_t *arguments[], wchar_t *destination[]) {
Expand Down
9 changes: 8 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ int wmain(int argc, const wchar_t *argv[]) {
getInputFromConsole(arguments, options);
}

if (options[OPT_DISPLAYHELP] == true) {
if (options[OPT_DISPLAYHELP] == true && inputMode == ARGUMENTS) {
displayHelp();
return EXIT_SUCCESS;
}

if (handleErrors(arguments) == EXIT_FAILURE) {
wprintf_s(L" %ls(Press any key to exit) %ls", CHARCOLOR_WHITE, COLOR_DEFAULT);

getwchar();

wprintf_s(L"\n");
SetConsoleTitleW(originalConsoleWindowTitle);

return EXIT_FAILURE;
}

Expand Down

0 comments on commit 352edc2

Please sign in to comment.