Chun-Chen TK Hsu has submitted this change and it was merged. (
https://gem5-review.googlesource.com/9081 )
Change subject: base: Fix loop range in pngwriter
......................................................................
base: Fix loop range in pngwriter
The inner loop range limit should be width instead of height.
Change-Id: I091c590713c945d4bd04ffcc974d4eb8aa23d1b2
Signed-off-by: Chun-Chen Hsu <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/9081
Maintainer: Andreas Sandberg <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
---
M src/base/pngwriter.cc
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Andreas Sandberg: Looks good to me, approved
diff --git a/src/base/pngwriter.cc b/src/base/pngwriter.cc
index 3251ac8..9faf23c 100644
--- a/src/base/pngwriter.cc
+++ b/src/base/pngwriter.cc
@@ -160,7 +160,7 @@
// 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);
}
--
To view, visit https://gem5-review.googlesource.com/9081
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I091c590713c945d4bd04ffcc974d4eb8aa23d1b2
Gerrit-Change-Number: 9081
Gerrit-PatchSet: 4
Gerrit-Owner: Chun-Chen TK Hsu <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Chun-Chen TK Hsu <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev