From 68dceb9859cd1d08acfef67beae5188cfa844e41 Mon Sep 17 00:00:00 2001 From: beeanyew Date: Thu, 12 Aug 2021 14:24:57 +0200 Subject: [PATCH] Something PiSCSI --- platforms/amiga/piscsi/piscsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platforms/amiga/piscsi/piscsi.c b/platforms/amiga/piscsi/piscsi.c index 96f402b..1b5c2e8 100644 --- a/platforms/amiga/piscsi/piscsi.c +++ b/platforms/amiga/piscsi/piscsi.c @@ -369,8 +369,10 @@ void piscsi_map_drive(char *filename, uint8_t index) { return; } - char hdfID[5] = { 0x00, 0x00, 0x00, 0x00, 0x00 }; - read(tmp_fd, hdfID, 3); + char hdfID[512]; + memset(hdfID, 0x00, 512); + read(tmp_fd, hdfID, 512); + hdID[4] = '\0'; if (strcmp(hdfID, "DOS") == 0 || strcmp(hdfID, "PFS") == 0 || strcmp(hdfID, "PDS") == 0 || strcmp(hdfID, "SFS") == 0) { printf("[!!!PISCSI] The disk image %s is a UAE Single Partition Hardfile!\n", filename); printf("[!!!PISCSI] WARNING: PiSCSI does NOT support UAE Single Partition Hardfiles!\n");