-
Robert Sprowson authored
Various places in Draw were making an error block (via makmsg or retmsg macros) from a cast pointer using the msg part of RISC_OSLib. However, as RISC_OSLib caches the messages file and returns direct pointers to it, the resulting error blocks would often not be word aligned, leading to an abort when the Wimp tries to copy it for the Wimp_ReportError. In turn, the abort would be reported as unhelpful "wimpt1" message because the signal handler was looking it up in the application messages, not the default RISC_OSLib messages. Draw.c: New function top copy the msg to a word aligned static struct. Fix signal handler to use msgs_default_control_block() so that "wimpt1" can be found. Draw.h/others: Replace makmsg and retmsg with calls to the new aligning function. Tested by dragging a GIF and a BMP to Draw, and it no longer aborts. Version 1.28. Tagged as 'Draw-1_28'
2ab1e96d