summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-08-15 22:11:38 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-08-15 22:11:38 +0000
commit64e0ee684c8661216bac1adc71b5140fb43eb46d (patch)
treea8646e83d9cfa46b5161da46c72e9f41f29da726
parentd892ff6887b2aa222af48a44048bed698f6fd64c (diff)
rectinsert.c: fixed yblocks,ublocks,vblocks arrays boundary overstep
(resulting in segfault) git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@412 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-rw-r--r--recordmydesktop/src/rectinsert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/recordmydesktop/src/rectinsert.c b/recordmydesktop/src/rectinsert.c
index 10d9841..dadcc0c 100644
--- a/recordmydesktop/src/rectinsert.c
+++ b/recordmydesktop/src/rectinsert.c
@@ -532,9 +532,9 @@ void BlocksFromList(RectArea **root,
while(temp!=NULL){
column_start=(temp->geom.x-x_offset)/Y_UNIT_WIDTH;
- column_end=(temp->geom.x+temp->geom.width-x_offset)/Y_UNIT_WIDTH;
+ column_end=(temp->geom.x+(temp->geom.width-1)-x_offset)/Y_UNIT_WIDTH;
row_start=(temp->geom.y-y_offset)/Y_UNIT_WIDTH;
- row_end=(temp->geom.y+temp->geom.height-y_offset)/Y_UNIT_WIDTH;
+ row_end=(temp->geom.y+(temp->geom.height-1)-y_offset)/Y_UNIT_WIDTH;
for(i=row_start;i<row_end+1;i++){
for(j=column_start;j<column_end+1;j++){
blockno=i*blocknum_x+j;
© All Rights Reserved