author | ecalot
<ecalot> 2005-03-09 21:17:52 UTC |
committer | ecalot
<ecalot> 2005-03-09 21:17:52 UTC |
parent | 64c7e8734fa342e26f29cb9efdb34a8eb9e7be26 |
stuff/contest/lzg/uncompress.c | +1 | -5 |
diff --git a/stuff/contest/lzg/uncompress.c b/stuff/contest/lzg/uncompress.c index 2ed9c58..fa0f833 100644 --- a/stuff/contest/lzg/uncompress.c +++ b/stuff/contest/lzg/uncompress.c @@ -64,15 +64,11 @@ void expandLzg(const unsigned char* array, int arraySize, while (rep--) { location=location%MAX_MXD_SIZE_IN_LZG; /* location is in range 0-1023 */ - h=(cursor-location)/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 */ - img[cursor]=img[ - h*MAX_MXD_SIZE_IN_LZG+ - location - ]; + img[cursor]=img[(cursor-location)-((cursor-location)%MAX_MXD_SIZE_IN_LZG)+location]; cursor++; location++;