From ddd479f2717219e2dd7076a64faaaec87e489b8c Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 11 Oct 2015 12:11:30 -0700 Subject: [PATCH] BUGFIX : don't read past the track buffer - Causes a disk image stability test to go green =) --- src/disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/disk.c b/src/disk.c index 6fe3a0f7..b937f188 100644 --- a/src/disk.c +++ b/src/disk.c @@ -401,11 +401,11 @@ static void denibblize_track(int drive, uint8_t *dst) { uint8_t *nib = work_buf; while (secloop < DATA_BYTES_LEN) { *(nib+secloop) = *(trackimage+tmpoff); + ++secloop; + ++tmpoff; if (tmpoff >= disk6.disk[drive].track_width) { tmpoff = 0; } - ++secloop; - ++tmpoff; } if (prologue[2] == 0x96) { // header