From 1b85572a3d86bf91776bc77cd8193ef3352c5769 Mon Sep 17 00:00:00 2001 From: MADRAFi Date: Thu, 23 May 2024 19:59:40 +0200 Subject: [PATCH] bugfix for file_version and IO Error --- pmax_upd.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pmax_upd.pas b/pmax_upd.pas index d8dd38e..d2de57e 100644 --- a/pmax_upd.pas +++ b/pmax_upd.pas @@ -9,7 +9,7 @@ uses atari, crt, sysutils, stringUtils, a8defines, a8defwin, a8libwin, a8libgadg, a8libmenu, a8libmisc, pm_detect, pm_config, pm_flash; const - VERSION = 'PokeyMAX Update v1.1'; + VERSION = 'PokeyMAX Update v1.2'; BYTESTOREAD = 256; SCREEN_ADDRESS = $BC40; DL_BLANK8 = %01110000; // 8 blank lines @@ -46,6 +46,7 @@ pmax_version: String[8]; file_version: String[8]; core_file: String[15]; + p: String[4]; f: File; function convert_bool(value: Boolean): String; @@ -73,11 +74,10 @@ procedure UpdateProgress(max: Word; y: Byte); begin i:=((val * 100) div max) + 1; if i > 100 then i:=100; - // reused string variable - file_version:= Concat(ByteToStr(i),'%'); + p:= Concat(ByteToStr(i),'%'); // clear row to hide larger string WPrint(win_progress, WPCNT, y, WOFF, ' '); - WPrint(win_progress, WPCNT, y, WOFF, file_version); + WPrint(win_progress, WPCNT, y, WOFF, p); GProg(win_progress, 3, y + 1, i); WPrint(win_progress, 18, y + 2, WOFF, HexStr(val, 5)); atract:= 0; @@ -499,7 +499,7 @@ procedure ProcessCore(filename: String[15]; mode: Byte); end; if read_input <> 0 then break; Inc(val, BYTESTOREAD); - until (val > pmax_config.max_address) or (IOResult = 3); + until (val >= pmax_config.max_address) or (IOResult = 3); close(f); if mode = FLASH_CORE then begin