From: ShadowFlare Date: Sat, 9 Sep 2006 09:23:27 +0000 (+0000) Subject: Fixed bug with encoding of long rows. X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=58a8b78cdc107c2e6136f562e9453723c7322949;p=grpapi.git Fixed bug with encoding of long rows. --- diff --git a/drawgrp/drawgrp.cpp b/drawgrp/drawgrp.cpp index f446793..06af64f 100644 --- a/drawgrp/drawgrp.cpp +++ b/drawgrp/drawgrp.cpp @@ -96,6 +96,11 @@ int main(int argc, char* argv[]) SetFunctionSetPixel((SETPIXELPROC)WritePixelToBuffer); for (i=0;iLeft + lpFrameHeader->Width - 1 && nRepeat < 0x3F; nRepeat++) {} + for (nRepeat = 0; lpImageData[i+x+nRepeat] == lpImageData[i+x+nRepeat+1] && x+nRepeat < lpFrameHeader->Left + lpFrameHeader->Width - 1 && nRepeat < 0x3E; nRepeat++) {} if (nRepeat > 2) { lpRowBuf[nBufPos] = 0x41 + nRepeat;