changeset 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 9a05ba6735b1
children c3418554467f
files engine/core/video/image.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;