git » fp-git.git » commit c71d439

discovered a new simplification

author ecalot
2005-03-09 20:42:58 UTC
committer ecalot
2005-03-09 20:42:58 UTC
parent eae2c4716575fcd73ef05e46d768566e8e5d829b

discovered a new simplification

stuff/contest/lzg/uncompress.c +1 -2

diff --git a/stuff/contest/lzg/uncompress.c b/stuff/contest/lzg/uncompress.c
index 56112f9..2db5c30 100644
--- a/stuff/contest/lzg/uncompress.c
+++ b/stuff/contest/lzg/uncompress.c
@@ -62,8 +62,7 @@ void expandLzg(const unsigned char* array, int arraySize,
 				
 				/* Here is the difference between big and small images */
 				while (rep--) {
-					h=cursor/MAX_MXD_SIZE_IN_LZG-
-						((location%MAX_MXD_SIZE_IN_LZG)>(cursor%MAX_MXD_SIZE_IN_LZG));
+					h=(cursor-(location%MAX_MXD_SIZE_IN_LZG))/MAX_MXD_SIZE_IN_LZG;
 					/*
 					 * if the image is stored in an array of 1024 x n bytes
 					 * "h" is the height and "location" is the width