Skip to content

Commit e8d076a

Browse files
committed
pofParser: fill CFM1/CFM2 section when present
1 parent 8b82749 commit e8d076a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pofParser.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ void POFParser::displayHeader()
6868
char mess[1024];
6969
snprintf(mess, 1024, "%02x %4s: ", v.flag, v.section.c_str());
7070
printInfo(mess, false);
71-
snprintf(mess, 1024, "%08x %08x", v.offset, v.len);
71+
// start address + len (in bits) + end addr
72+
snprintf(mess, 1024, " %08x %08x %08x", v.offset, v.len, v.offset + ((v.len/8)-1));
73+
/* Note: for CFM0 end address is displayed with another value in () */
7274
printSuccess(mess);
7375
}
7476
}
@@ -109,6 +111,10 @@ int POFParser::parse()
109111
/* update pointers to memory area */
110112
ptr = (uint8_t *)_bit_data.data();
111113
mem_section["CFM0"].data = &ptr[mem_section["CFM0"].offset + 0x0C];
114+
if (getMemSection("CFM1") != -1)
115+
mem_section["CFM1"].data = &ptr[mem_section["CFM1"].offset + 0x0C];
116+
if (getMemSection("CFM2") != -1)
117+
mem_section["CFM2"].data = &ptr[mem_section["CFM2"].offset + 0x0C];
112118
mem_section["UFM"].data = &ptr[mem_section["UFM"].offset + 0x0C];
113119
mem_section["ICB"].data = &ptr[mem_section["ICB"].offset + 0x0C];
114120

0 commit comments

Comments
 (0)