X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fintegrity.c;h=5cbe021e6f53ee0a4dc397abf51db33e68cb7d90;hp=99a9a9fd64b7e61c5fe7db52696e541e552ab42d;hb=98979811f22d45b56d2578df0fde56035f1f4b2d;hpb=65bb9ae621f3e5b5d9a20412f892e6c8fce35bd2 diff --git a/src/integrity.c b/src/integrity.c index 99a9a9fd..5cbe021e 100644 --- a/src/integrity.c +++ b/src/integrity.c @@ -332,9 +332,8 @@ write_integrity_table(WIMStruct *wim, wimlib_assert(old_lookup_table_end <= new_lookup_table_end); - if (wim->hdr.integrity.offset == 0 || old_lookup_table_end == 0) { - old_table = NULL; - } else { + old_table = NULL; + if (wim_has_integrity_table(wim) && old_lookup_table_end != 0) { ret = read_integrity_table(wim, old_lookup_table_end - WIM_HEADER_DISK_SIZE, &old_table); @@ -477,7 +476,7 @@ check_wim_integrity(WIMStruct *wim, wimlib_progress_func_t progress_func) struct integrity_table *table; u64 end_lookup_table_offset; - if (wim->hdr.integrity.offset == 0) { + if (!wim_has_integrity_table(wim)) { DEBUG("No integrity information."); return WIM_INTEGRITY_NONEXISTENT; }