Fix off-by-one bug in Pixmap::WritePng.

pull/33/head
whitequark 2016-07-25 00:51:24 +00:00
parent 6846010416
commit 6d5d88f01e
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ bool Pixmap::WritePng(FILE *f, bool flip) {
if(flip) { if(flip) {
rows.push_back(&data[stride * y]); rows.push_back(&data[stride * y]);
} else { } else {
rows.push_back(&data[stride * (height - y)]); rows.push_back(&data[stride * (height - y - 1)]);
} }
} }