From 2c0c401608d97130409fa877b2c4e1ce8308fccf Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 9 Aug 2014 13:12:31 +0000 Subject: [PATCH] duh (nw) --- src/lib/formats/flopimg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index a1c51d52bad..97c0b6bf704 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -964,11 +964,11 @@ void floppy_image::get_maximal_geometry(int &_tracks, int &_heads) void floppy_image::get_actual_geometry(int &_tracks, int &_heads) { - int maxt = tracks*4, maxh = heads-1; + int maxt = (tracks-1)*4, maxh = heads-1; while(maxt >= 0) { for(int i=0; i<=maxh; i++) - if(get_track_size(maxt, i)) + if(track_array[maxt][i].track_size) goto track_done; maxt--; } @@ -976,7 +976,7 @@ void floppy_image::get_actual_geometry(int &_tracks, int &_heads) if(maxt >= 0) while(maxh >= 0) { for(int i=0; i<=maxt; i++) - if(get_track_size(i, maxh)) + if(track_array[i][maxh].track_size) goto head_done; maxh--; } @@ -988,7 +988,7 @@ void floppy_image::get_actual_geometry(int &_tracks, int &_heads) int floppy_image::get_resolution() const { int mask = 0; - for(int i=0; i