File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ public:
144
144
145
145
for (auto region : memoryRegions) {
146
146
htmlStream << " <h2>Region: " << std::get<3 >(region) << " </h2>" << std::endl;
147
- htmlStream << " <p>Start Address: " << std::get<0 >(region) << " (End Address:) " << std::get<0 >(region)+ std::get<1 >(region) * std::get<2 >(region) << " </p>" << std::endl;
147
+ // As the memory region is already a pointer of the correct data type, we do not actually need to multiply the size by the size of the data type
148
+ htmlStream << " <p>Start Address: " << std::get<0 >(region) << " (End Address:) " << std::get<0 >(region) + std::get<1 >(region) << " </p>" << std::endl;
148
149
htmlStream << " <p>Number of Elements: " << std::get<1 >(region) << " </p>" << std::endl;
149
150
htmlStream << " <p>Size of Single Element: " << std::get<2 >(region) << " </p>" << std::endl;
150
151
}
@@ -224,7 +225,8 @@ public:
224
225
// Store the start address, number of elements and the size of a single element
225
226
jsStream << " {" ;
226
227
jsStream << " \" StartAddress\" : \" " << std::hex << std::get<0 >(region) << " \" ," ;
227
- jsStream << " \" EndAddress\" : \" " << std::get<0 >(region) + std::get<1 >(region) * std::get<2 >(region) << " \" ," ;
228
+ // As the memory region is already a pointer of the correct data type, we do not actually need to multiply the size by the size of the data type
229
+ jsStream << " \" EndAddress\" : \" " << std::get<0 >(region) + std::get<1 >(region) << " \" ," ;
228
230
jsStream << " \" NumberOfElements\" : " << std::dec << std::get<1 >(region) << " ," ;
229
231
jsStream << " \" SizeOfSingleElement\" : " << std::get<2 >(region) << " ," ;
230
232
jsStream << " \" Name\" : \" " << std::get<3 >(region) << " \" " ;
You can’t perform that action at this time.
0 commit comments