mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 00:41:12 +00:00
Fixed yet another two long standing bugs in Screen::encodeShape.
svn-id: r31633
This commit is contained in:
parent
87f10ebe40
commit
9616ec94c9
@ -2242,6 +2242,8 @@ uint8 *Screen::encodeShape(int x, int y, int w, int h, int flags) {
|
||||
src = _animBlockPtr;
|
||||
memcpy(dst, src, shapeSize2);
|
||||
dst = newShape;
|
||||
if (_vm->gameFlags().useAltShapeHeader)
|
||||
dst += 2;
|
||||
flags = READ_LE_UINT16(dst);
|
||||
flags |= 2;
|
||||
WRITE_LE_UINT16(dst, flags);
|
||||
@ -2326,7 +2328,8 @@ int16 Screen::encodeShapeAndCalculateSize(uint8 *from, uint8 *to, int size_to) {
|
||||
byte *fromBackUp = from;
|
||||
byte *toBackUp = to;
|
||||
--to;
|
||||
for (int i = 0; i < (fromPtrEnd - from); ++i) {
|
||||
const int checkSize = fromPtrEnd - from;
|
||||
for (int i = 0; i < checkSize; ++i) {
|
||||
if (*from++ != *to++)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user