Commit 3a422e89092006bd82fc1982bd0fdea50a5ac512
authorvintagepc <53943260+vintagepc@users.noreply.github.com>
Sun, 18 Apr 2021 21:46:57 +0000 (17:46 -0400)
committervintagepc <53943260+vintagepc@users.noreply.github.com>
Sun, 18 Apr 2021 21:46:57 +0000 (17:46 -0400)
simavr/sim/sim_hex.c

index 18047c2d554dd0fd46b9a93613e0a01262320944..05fd65d7eeb786c7c899db8ef980e900440e9f75 100644 (file)
@@ -132,7 +132,8 @@ read_ihex_chunks(
                        case 0: // normal data
                                addr = segment | (bline[1] << 8) | bline[2];
                                break;
-                       case 1: // end of file
+                       case 1: // end of file - reset segment
+                               segment = 0;
                                continue;
                        case 2: // extended address 2 bytes
                                segment = ((bline[4] << 8) | bline[5]) << 4;