summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-30 15:56:17 -0400
committerKonstantin Käfer <mail@kkaefer.com>2014-10-30 15:56:17 -0400
commit8dda6482fa429e01da087a690ca7d9cde3a7abc0 (patch)
tree94207f76727f2894b5eb90afea4a1c81276915ab /test
parent2ebe167add05047f4cb611503064549c0b217d18 (diff)
downloadqtlocation-mapboxgl-8dda6482fa429e01da087a690ca7d9cde3a7abc0.tar.gz
fix image y reversal
Diffstat (limited to 'test')
-rw-r--r--test/headless.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/headless.cpp b/test/headless.cpp
index 3837beb9a0..0f4e100271 100644
--- a/test/headless.cpp
+++ b/test/headless.cpp
@@ -104,7 +104,7 @@ TEST_P(HeadlessTest, render) {
const int stride = w * 4;
auto tmp = std::unique_ptr<char[]>(new char[stride]());
char *rgba = reinterpret_cast<char *>(pixels.get());
- for (int i = 0, j = height - 2; i < j; i++, j--) {
+ for (int i = 0, j = height - 1; i < j; i++, j--) {
memcpy(tmp.get(), rgba + i * stride, stride);
memcpy(rgba + i * stride, rgba + j * stride, stride);
memcpy(rgba + j * stride, tmp.get(), stride);