Fixed row alignment of OTA bitmap for --picture-send (when (width%8)!=0)
authorshort <>
Sun, 16 Dec 2001 07:58:57 +0000 (07:58 +0000)
committershort <>
Sun, 16 Dec 2001 07:58:57 +0000 (07:58 +0000)
  - Nokia SmartMessaging spec. 3.0, paragraph 3.7.1.2 (Image Data Structure)

mdsms.c

diff --git a/mdsms.c b/mdsms.c
index 686e402..c86f978 100644 (file)
--- a/mdsms.c
+++ b/mdsms.c
@@ -1430,7 +1430,7 @@ unsigned char binn[140]={
 unsigned char header[]={
        0x30,   /* version string '0' */
        0x02,   /* item=OTA bitmap */
-#define PICTURE_BYTES (((PICTURE_WIDTH+7)/8)*PICTURE_HEIGHT)
+#define PICTURE_BYTES ((PICTURE_WIDTH*PICTURE_HEIGHT+7)/8)
 #define PICTURE_BYTES_INCL_HEADER (PICTURE_BYTES +4/*header*/)
        PICTURE_BYTES_INCL_HEADER>>8,PICTURE_BYTES_INCL_HEADER&0xFF,    /* picture size in bytes incl. header */
        0x00, /* animation pictures - 0=static picture */