Revision: 45360
http://sourceforge.net/p/vice-emu/code/45360
Author: oldwoman37
Date: 2024-10-25 14:03:57 +0000 (Fri, 25 Oct 2024)
Log Message:
-----------
Removed warning 'disk image will get extended' for CMD FD images as logical tracks do not relate to physical ones; also cleaned up memory leak
Modified Paths:
--------------
trunk/vice/src/drive/iec/fdd.c
Modified: trunk/vice/src/drive/iec/fdd.c
===================================================================
--- trunk/vice/src/drive/iec/fdd.c 2024-10-19 09:06:35 UTC (rev 45359)
+++ trunk/vice/src/drive/iec/fdd.c 2024-10-25 14:03:57 UTC (rev 45360)
@@ -139,6 +139,12 @@
if (!drv) {
return;
}
+ /* clean up memory from CRC tables */
+ if (crc1021) {
+ lib_free(crc1021);
+ /* prevent multiple instances of fdd_shutdown to unallocate this table */
+ crc1021 = NULL;
+ }
lib_free(drv->myname);
lib_free(drv);
}
@@ -706,10 +712,16 @@
drv->image->tracks, drv->image->max_half_tracks);
#endif
if (drv->image) {
- if (drv->drive->current_half_track > (drv->image->tracks * 2)) {
- log_warning(LOG_DEFAULT, "disk image will get extended (%d tracks)",
- drv->drive->current_half_track / 2);
- /* FIXME: actually extend the image here */
+ /* don't do check on the "image" tracks here since this value for the
+ CMDFDs is logical not physical */
+ if (drv->image->type != DISK_IMAGE_TYPE_D1M &&
+ drv->image->type != DISK_IMAGE_TYPE_D2M &&
+ drv->image->type != DISK_IMAGE_TYPE_D4M) {
+ if (drv->drive->current_half_track > (drv->image->tracks * 2)) {
+ log_warning(LOG_DEFAULT, "disk image will get extended (%d tracks)",
+ drv->drive->current_half_track / 2);
+ /* FIXME: actually extend the image here */
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|