From 734abb5a53f498dcac30d4a9e6c5b37a57e6eb61 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 17 Oct 2013 14:18:27 +0300 Subject: DRACI: Fix potential sign extention. CID 1003514 --- engines/draci/sprite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp index 965cdabf3e..9a78904d25 100644 --- a/engines/draci/sprite.cpp +++ b/engines/draci/sprite.cpp @@ -38,9 +38,9 @@ const Displacement kNoDisplacement = { 0, 0, 1.0, 1.0 }; * height height of the image in the buffer */ static void transformToRows(byte *img, uint16 width, uint16 height) { - byte *buf = new byte[width * height]; + byte *buf = new byte[(uint)(width * height)]; byte *tmp = buf; - memcpy(buf, img, width * height); + memcpy(buf, img, (uint)(width * height)); for (uint16 i = 0; i < width; ++i) { for (uint16 j = 0; j < height; ++j) { -- cgit v1.2.3