If an invalid class or instance is encountered, PermMem stops further processing. This results in subsequent handles not being read and may result in a crash when saving afterwards.
This issue does only arise when a class or instance is removed or renamed in a later version of a mod, which is rather unlikely.
Instead of returning and leaving PermMem to deal with a next unvalid line to read (always results in "Unbekannte Zeile in Speicherdatei."), the function should seek the next line containing '}' before returning to essentially skip the unknown object.
If an invalid class or instance is encountered, PermMem stops further processing. This results in subsequent handles not being read and may result in a crash when saving afterwards.
This issue does only arise when a class or instance is removed or renamed in a later version of a mod, which is rather unlikely.
Invalid classes or instances are detected already here: https://github.com/Lehona/LeGo/blob/e8c796723d448ee6e98be39554d0a86b9c26b519/PermMem.d#L1238-L1248
Instead of returning and leaving PermMem to deal with a next unvalid line to read (always results in "Unbekannte Zeile in Speicherdatei."), the function should seek the next line containing '}' before returning to essentially skip the unknown object.