Chun-Chen TK Hsu has uploaded this change for review. ( 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 <chunchen...@google.com>
---
M src/base/pngwriter.cc
1 file changed, 1 insertion(+), 1 deletion(-)



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: 1
Gerrit-Owner: Chun-Chen TK Hsu <chunchen...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to