diff options
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r-- | recordmydesktop/src/cache_frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
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]); |