X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flookup_table.c;h=b22def2953e58c6dd634de83605ea661007bfefc;hp=6370f03873440edf83e634bc7264a0a5b1d4ca67;hb=4a3cea03c478c289d3b779fe8f8b2f3bb8fbd275;hpb=7e7070982833be4292431b7dbffa8280e27b3d8a diff --git a/src/lookup_table.c b/src/lookup_table.c index 6370f038..b22def29 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -498,6 +498,7 @@ write_lookup_table(WIMStruct *w, int image, struct resource_entry *out_res_entry if (start_offset == -1) return WIMLIB_ERR_WRITE; + /* Write lookup table entries for metadata resources */ if (image == WIMLIB_ALL_IMAGES) { start_image = 1; end_image = w->hdr.image_count; @@ -516,10 +517,12 @@ write_lookup_table(WIMStruct *w, int image, struct resource_entry *out_res_entry return ret; } + /* Write lookup table entries for other resources */ ret = for_lookup_table_entry(w->lookup_table, write_lookup_table_entry, out); if (ret) return ret; + /* Fill in the resource entry for the lookup table itself */ end_offset = ftello(out); if (end_offset == -1) return WIMLIB_ERR_WRITE;