]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix MDS CD image detection.
authorToni Wilen <twilen@winuae.net>
Tue, 31 Dec 2019 15:41:33 +0000 (17:41 +0200)
committerToni Wilen <twilen@winuae.net>
Tue, 31 Dec 2019 15:41:33 +0000 (17:41 +0200)
blkdev_cdimage.cpp

index eda952d816540bb6b3372b549df3443939037775..80974327f05fc73e1be452ddf4b886ee82e701bf 100644 (file)
@@ -1319,7 +1319,7 @@ static int parsemds (struct cdunit *cdu, struct zfile *zmds, const TCHAR *img, c
                goto end;
 
        head = (MDS_Header*)mds;
-       if (!memcmp (head->signature, MEDIA_DESCRIPTOR, strlen (MEDIA_DESCRIPTOR)))
+       if (!memcmp (head->signature, MEDIA_DESCRIPTOR, sizeof(MEDIA_DESCRIPTOR)))
                goto end;
        if (head->version[0] != 1) {
                write_log (_T("unsupported MDS version %d, only v.1 supported\n"), head->version[0]);