BUGFIX : don't read past the track buffer

- Causes a disk image stability test to go green =)
This commit is contained in:
Aaron Culliney 2015-10-11 12:11:30 -07:00
parent aa225d6e48
commit ddd479f271

View File

@ -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