[recordmydesktop-svn-commit] SF.net SVN: recordmydesktop:[592] trunk/recordmydesktop/src/rmd_get_fr
Status: Alpha
Brought to you by:
enselic
From: svn c. f. r. <rec...@li...> - 2009-01-11 11:08:31
|
Revision: 592 http://recordmydesktop.svn.sourceforge.net/recordmydesktop/?rev=592&view=rev Author: enselic Date: 2009-01-11 11:08:25 +0000 (Sun, 11 Jan 2009) Log Message: ----------- src/rmd_get_frame.c: Work around issue with underflow in rmdBlocksFromList(). I call this a "workaround" because the whole code base needs to stop using unsigned so much IMO. Modified Paths: -------------- trunk/recordmydesktop/src/rmd_get_frame.c Modified: trunk/recordmydesktop/src/rmd_get_frame.c =================================================================== --- trunk/recordmydesktop/src/rmd_get_frame.c 2009-01-11 10:27:57 UTC (rev 591) +++ trunk/recordmydesktop/src/rmd_get_frame.c 2009-01-11 11:08:25 UTC (rev 592) @@ -319,13 +319,13 @@ unsigned int blocknum_y) { RectArea *temp; - unsigned int i, - j, - blockno, - row_start, - row_end, - column_start, - column_end; + int i, + j, + blockno, + row_start, + row_end, + column_start, + column_end; temp = *root; @@ -335,10 +335,10 @@ while (temp != NULL) { - column_start = (temp->rect.x - x_offset) / Y_UNIT_WIDTH; - column_end = (temp->rect.x + (temp->rect.width - 1) - x_offset) / Y_UNIT_WIDTH; - row_start = (temp->rect.y - y_offset) / Y_UNIT_WIDTH; - row_end = (temp->rect.y + (temp->rect.height - 1) - y_offset) / Y_UNIT_WIDTH; + column_start = ((int)(temp->rect.x - x_offset)) / Y_UNIT_WIDTH; + column_end = ((int)(temp->rect.x + (temp->rect.width - 1) - x_offset)) / Y_UNIT_WIDTH; + row_start = ((int)(temp->rect.y - y_offset)) / Y_UNIT_WIDTH; + row_end = ((int)(temp->rect.y + (temp->rect.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++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |