Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(ref. #8) Change to RecordProcessor::Accept()
Browse files Browse the repository at this point in the history
Added extra info to what is being printed.
 - Added Record Type string (i.e. 'REFR', 'ACHR', etc)
 - Added MOD id number
  • Loading branch information
leandor committed Oct 24, 2016
1 parent 3c2971f commit dda8a62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/GenericRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ bool RecordProcessor::Accept(RecordHeader &header)
{
if (IsAddMasters) //If not, can cause any new records to be given a duplicate ID
{
printer("RecordProcessor MOD=(%s): Warning - Information lost. Record skipped with duplicate formID: %08X\n", curModFile->FileName, header.formID);
// TODO: Make a helper method to do this conversion
auto typeStr = reinterpret_cast<const char* const>(&header.type);
auto recordType = std::string(&typeStr[0], &typeStr[4]);
printer("WARNING -> RecordProcessor: Information lost. Record skipped due to duplicate FORMID. [MOD=(%s), MODID: (%02X), FORMID: (%08X) TYPE=(%-4s)]\n", curModFile->FileName, curModFile->ModID, header.formID, recordType.c_str());
}

return false;
Expand Down

0 comments on commit dda8a62

Please sign in to comment.