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
@@ -21,8 +21,12 @@
#include "Dlgcode.h"
#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 */
BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -91,9 +95,9 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
LPWSTR *arguments = CommandLineToArgvW (GetCommandLineW(), &argumentCount);
if (!arguments)
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
return 0;
}
--argumentCount;
@@ -119,9 +123,9 @@ 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();
}
}
else