ESM4 reader skips last record in content files
The ESM4 reader's getRecordHeader() function adds the entire record's size to the context's fileRead counter as soon as it runs. This makes the check in readerutils.hpp return one record early.
This ESM4 ESP has two NPC_ records, but esmtool.exe dumps one:
.\esmtool dump ESM4LastRecordSkipped.esp
Using default (English) font encoding.
Loading TES4 file: "ESM4LastRecordSkipped.esp"
Author: OpenMW test
Description: The last record in this file is never read
File format version: 1.71
Masters:
Morrowind.esm, 0 bytes
Group: RecordType GRUP
Record: NPC_
Id: 0x800
Record flags: [None] (0x00000000)
EditorId: TestFirstNpc
FullName:
Model:
Kf:
Data: ?