summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/osd.c b/osd.c
index 4b1dd051..6652325c 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 4.9 2020/10/13 13:47:10 kls Exp $
+ * $Id: osd.c 4.10 2020/11/16 15:53:53 kls Exp $
*/
#include "osd.h"
@@ -1109,18 +1109,18 @@ cImage::cImage(void)
cImage::cImage(const cImage &Image)
{
size = Image.Size();
- int l = size.Width() * size.Height() * sizeof(tColor);
+ int l = size.Width() * size.Height();
data = MALLOC(tColor, l);
- memcpy(data, Image.Data(), l);
+ memcpy(data, Image.Data(), l * sizeof(tColor));
}
cImage::cImage(const cSize &Size, const tColor *Data)
{
size = Size;
- int l = size.Width() * size.Height() * sizeof(tColor);
+ int l = size.Width() * size.Height();
data = MALLOC(tColor, l);
if (Data)
- memcpy(data, Data, l);
+ memcpy(data, Data, l * sizeof(tColor));
}
cImage::~cImage()