diff options
Diffstat (limited to 'src/lib/util/chd.c')
-rw-r--r-- | src/lib/util/chd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/util/chd.c b/src/lib/util/chd.c index 406b478eb14..53a330727a6 100644 --- a/src/lib/util/chd.c +++ b/src/lib/util/chd.c @@ -1589,6 +1589,9 @@ void chd_file::parse_v5_header(UINT8 *rawheader, sha1_t &parentsha1) m_compression[2] = be_read(&rawheader[24], 4); m_compression[3] = be_read(&rawheader[28], 4); + if (compressed() && m_allow_writes) + throw CHDERR_FILE_NOT_WRITEABLE; + // describe the format m_mapoffset_offset = 40; m_metaoffset_offset = 48; |