From 6ddb091a949d1c7ef107307aedf980bc34f6aa57 Mon Sep 17 00:00:00 2001 From: iovar Date: Mon, 29 Jan 2007 13:05:19 +0000 Subject: added check in configure.ac for machine/endian.h (BSD). Fixed fpe in FlushBlock git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@268 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/cache_frame.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recordmydesktop/src') diff --git a/recordmydesktop/src/cache_frame.c b/recordmydesktop/src/cache_frame.c index 4258932..d57ecfd 100644 --- a/recordmydesktop/src/cache_frame.c +++ b/recordmydesktop/src/cache_frame.c @@ -65,8 +65,8 @@ int FlushBlock(unsigned char *buf, int flush){ int j,i, bytes_written=0, - block_i=blockno/(width/blockwidth),//place on the grid - block_k=blockno%(width/blockwidth); + block_i=(!blockwidth)?0:(blockno/(width/blockwidth)),//place on the grid + block_k=(!blockwidth)?0:(blockno%(width/blockwidth)); register unsigned char *buf_reg=(&buf[(block_i* width+ block_k)*blockwidth]); -- cgit v1.2.3