File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ public:
144144
145145 for (auto region : memoryRegions) {
146146 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;
148149 htmlStream << " <p>Number of Elements: " << std::get<1 >(region) << " </p>" << std::endl;
149150 htmlStream << " <p>Size of Single Element: " << std::get<2 >(region) << " </p>" << std::endl;
150151 }
@@ -224,7 +225,8 @@ public:
224225 // Store the start address, number of elements and the size of a single element
225226 jsStream << " {" ;
226227 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) << " \" ," ;
228230 jsStream << " \" NumberOfElements\" : " << std::dec << std::get<1 >(region) << " ," ;
229231 jsStream << " \" SizeOfSingleElement\" : " << std::get<2 >(region) << " ," ;
230232 jsStream << " \" Name\" : \" " << std::get<3 >(region) << " \" " ;
You can’t perform that action at this time.
0 commit comments