X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fsplit.c;h=b8cb67896e57743eec0e768455260f9c76dbfcdd;hb=35dd893208119869db6a90b1d1663f9aea88a3f7;hp=40c861a1a356efb5276caacb7f7bdaea3b00af85;hpb=ef8f45b98b5c4db398321cd36d052ccbb9c3784a;p=wimlib diff --git a/src/split.c b/src/split.c index 40c861a1..b8cb6789 100644 --- a/src/split.c +++ b/src/split.c @@ -10,16 +10,16 @@ * This file is part of wimlib, a library for working with WIM files. * * wimlib is free software; you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) + * terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) * any later version. * * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with wimlib; if not, see http://www.gnu.org/licenses/. */ @@ -57,7 +57,7 @@ static int finish_swm(WIMStruct *w, struct lookup_table_entry *lte_chain_head, if (ret != 0) return ret; struct lookup_table_entry *prev = lte_chain_head; - lte_chain_head = prev->next_lte_in_swm; + lte_chain_head = lte_chain_head->next_lte_in_swm; prev->next_lte_in_swm = NULL; } off_t xml_data_offset = ftello(w->out_fp); @@ -184,9 +184,10 @@ WIMLIBAPI int wimlib_split(const char *wimfile, const char *swm_name, w->write_metadata = true; for (int i = 0; i < w->hdr.image_count; i++) { - struct lookup_table_entry *metadata_lte; + DEBUG("Writing metadata resource %d", i); + metadata_lte = w->image_metadata[i].metadata_lte; ret = copy_resource(metadata_lte, w); if (ret != 0)