From 4ffb512faefbe8c6be8e7e95183a6e036ee03160 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 8 Oct 2014 11:27:40 +0000 Subject: [PATCH] Fix error in get_region_pixels_i that causes crash in tinydisplay --- panda/src/display/displayRegion.I | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/display/displayRegion.I b/panda/src/display/displayRegion.I index 5f14074538..53d68ff00d 100644 --- a/panda/src/display/displayRegion.I +++ b/panda/src/display/displayRegion.I @@ -580,9 +580,9 @@ get_region_pixels_i(int i, int &xo, int &yo, int &w, int &h) const { CDReader cdata(_cycler); const Region ®ion = cdata->_regions[i]; xo = region._pixels_i[0]; - yo = region._pixels_i[2]; + yo = region._pixels_i[3]; w = region._pixels_i[1] - xo; - h = region._pixels_i[3] - yo; + h = region._pixels_i[2] - yo; } //////////////////////////////////////////////////////////////////// @@ -1068,9 +1068,9 @@ INLINE void DisplayRegionPipelineReader:: get_region_pixels_i(int i, int &xo, int &yo, int &w, int &h) const { const DisplayRegion::Region ®ion = _cdata->_regions[i]; xo = region._pixels_i[0]; - yo = region._pixels_i[2]; + yo = region._pixels_i[3]; w = region._pixels_i[1] - xo; - h = region._pixels_i[3] - yo; + h = region._pixels_i[2] - yo; } ////////////////////////////////////////////////////////////////////