The inner loop range limit should be width instead of height.
Change-Id: I091c590713c945d4bd04ffcc974d4eb8aa23d1b2
Signed-off-by: Chun-Chen Hsu <chunchenhsu@google.com>
Reviewed-on: https://gem5-review.googlesource.com/9081
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
// libpng requires an array of pointers to the frame buffer's rows.
std::vector<PixelType> rowPacked(width);
for (unsigned y=0; y < height; ++y) {
- for (unsigned x=0; x < height; ++x) {
+ for (unsigned x=0; x < width; ++x) {
rowPacked[x] = fb.pixel(x, y);
}