[ui] fix possible truncation of short image path

* Closes #1233
* Also fix MinGW builds due to missing PROCESSOR_ARCHITECTURE_ARM64 define
This commit is contained in:
Pete Batard 2018-10-22 22:28:20 +01:00
parent 6109d91c38
commit 7757cab3c5
3 changed files with 10 additions and 7 deletions

View file

@ -1071,7 +1071,9 @@ DWORD WINAPI ISOScanThread(LPVOID param)
} else {
if (!dont_display_image_name) {
for (i = (int)safe_strlen(image_path); (i > 0) && (image_path[i] != '\\'); i--);
short_image_path = &image_path[i + 1];
if (i != 0)
i++;
short_image_path = &image_path[i];
PrintStatus(0, MSG_205, short_image_path);
UpdateImage();
uprintf("Using image: %s (%s)", short_image_path, SizeToHumanReadable(img_report.image_size, FALSE, FALSE));