diff engine/core/video/image.cpp @ 161:e62122d12727

Fixed a tiny off-by-one in the getBixel function.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 14 Oct 2008 20:20:29 +0000
parents 90005975cdbb
children c3418554467f
line wrap: on
line diff
--- a/engine/core/video/image.cpp	Tue Oct 14 17:29:56 2008 +0000
+++ b/engine/core/video/image.cpp	Tue Oct 14 20:20:29 2008 +0000
@@ -108,7 +108,7 @@
 	}
 
 	void Image::getPixelRGBA(int x, int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) {
-		if ((x < 0) || (x >= m_surface->w) || (y < 0) || (y >= m_surface->h)) {
+		if ((x < 0) || (x > m_surface->w) || (y < 0) || (y > m_surface->h)) {
 			r = 0;
 			g = 0;
 			b = 0;