Commit a0322e74 authored by ROOL's avatar ROOL 🤖
Browse files

Correction to Wimp message length

Detail:
  The structure definition includes an initial slot for a type, so the length calculation should subtract 1 when using sizeof().

Version 1.36. Tagged as 'Draw-1_36'
parent 0857587f
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.1.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -10,14 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.35"
Module_Version SETA 135
Module_MajorVersion SETS "1.36"
Module_Version SETA 136
Module_MinorVersion SETS ""
Module_Date SETS "16 Mar 2019"
Module_ApplicationDate SETS "16-Mar-19"
Module_Date SETS "08 Jun 2019"
Module_ApplicationDate SETS "08-Jun-19"
Module_ComponentName SETS "Draw"
Module_ComponentPath SETS "apache/RiscOS/Sources/Apps/Draw"
Module_FullVersion SETS "1.35"
Module_HelpVersion SETS "1.35 (16 Mar 2019)"
Module_FullVersion SETS "1.36"
Module_HelpVersion SETS "1.36 (08 Jun 2019)"
END
/* (1.35)
/* (1.36)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.35
#define Module_MajorVersion_CMHG 1.36
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 16 Mar 2019
#define Module_Date_CMHG 08 Jun 2019
#define Module_MajorVersion "1.35"
#define Module_Version 135
#define Module_MajorVersion "1.36"
#define Module_Version 136
#define Module_MinorVersion ""
#define Module_Date "16 Mar 2019"
#define Module_Date "08 Jun 2019"
#define Module_ApplicationDate "16-Mar-19"
#define Module_ApplicationDate "08-Jun-19"
#define Module_ComponentName "Draw"
#define Module_ComponentPath "apache/RiscOS/Sources/Apps/Draw"
#define Module_FullVersion "1.35"
#define Module_HelpVersion "1.35 (16 Mar 2019)"
#define Module_LibraryVersionInfo "1:35"
#define Module_FullVersion "1.36"
#define Module_HelpVersion "1.36 (08 Jun 2019)"
#define Module_LibraryVersionInfo "1:36"
......@@ -563,7 +563,7 @@ static BOOL draw_clipboard_send_datarequest(wimp_eventstr *e)
int *types;
memset(&msg, 0, sizeof(wimp_msgstr));
msg.hdr.size = 20 + (6 * sizeof(int)) + sizeof(wimp_msghdr);
msg.hdr.size = sizeof(wimp_msghdr) + sizeof(wimp_msgdatarequest) + (6-1)*sizeof(int);
msg.hdr.action = wimp_MDATAREQUEST;
msg.data.datarequest.w = 0;
msg.data.datarequest.h = &clipdata;
......
......@@ -741,7 +741,7 @@ static void draw_drag_dragclaim_send(wimp_eventstr *e)
list[4] = FileType_DataExchangeFormat;
list[5] = wimp_MDRAGCLAIM_types_end;
msg.hdr.size = sizeof(wimp_msghdr) + 6*sizeof(int) + sizeof(wimp_msgdragclaim);
msg.hdr.size = sizeof(wimp_msghdr) + sizeof(wimp_msgdragclaim) + (6-1)*sizeof(int);
wimp_sendmessage (wimp_ESEND, &msg, e->data.msg.hdr.task);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment