1
0
Fork 0

Make error messages clearer if x96dbg fails to open a file

When x96dbg failed to open a file, it displayed a message box with the path as the message and a reason string as the caption. This looks weird, as the caption conveys useful information but it can usually be truncated.

We should display the reason string as the message, and the path as the caption instead.
This commit is contained in:
LIU Hao 2023-10-27 00:17:32 +08:00 committed by GitHub
parent a4be9f87f5
commit e9dfe3020e
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -714,9 +714,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
break;
case PeArch::Invalid:
if(FileExists(szPath))
MessageBox(nullptr, argv[1], LoadResString(IDS_INVDPE), MB_ICONERROR);
MessageBox(nullptr, LoadResString(IDS_INVDPE), argv[1], MB_ICONERROR);
else
MessageBox(nullptr, argv[1], LoadResString(IDS_FILEERR), MB_ICONERROR);
MessageBox(nullptr, LoadResString(IDS_FILEERR), argv[1], MB_ICONERROR);
break;
default:
__debugbreak();