VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Cmdline.c')
-rw-r--r--src/Common/Cmdline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Common/Cmdline.c b/src/Common/Cmdline.c
index 6e325fe3..929b777d 100644
--- a/src/Common/Cmdline.c
+++ b/src/Common/Cmdline.c
@@ -22,6 +22,10 @@
#include "Language.h"
#include <Strsafe.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
/* Except in response to the WM_INITDIALOG message, the dialog box procedure
should return nonzero if it processes the message, and zero if it does
not. - see DialogProc */
@@ -92,7 +96,7 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
LPWSTR *arguments = CommandLineToArgvW (GetCommandLineW(), &argumentCount);
if (!arguments)
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
return 0;
}
@@ -120,7 +124,7 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
int len = WideCharToMultiByte (CP_ACP, 0, arguments[i + 1], -1, arg, (int) argLen + 1, NULL, NULL);
if (len == 0)
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
AbortProcessSilent();
}
}