Commit ff7df43a authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix abort when exporting JPEGs from save menu

Pesky C letting me cast a pointer as a pointer to a pointer. Extra indirection added.
Reported by Christopher Dewhurst.

Version 1.21. Tagged as 'Draw-1_21'
parent c01d3f6b
| Copyright 1996 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.20"
Module_Version SETA 120
Module_MajorVersion SETS "1.21"
Module_Version SETA 121
Module_MinorVersion SETS ""
Module_Date SETS "14 Jan 2012"
Module_ApplicationDate SETS "14-Jan-12"
Module_Date SETS "11 Aug 2012"
Module_ApplicationDate SETS "11-Aug-12"
Module_ComponentName SETS "Draw"
Module_ComponentPath SETS "castle/RiscOS/Sources/Apps/Draw"
Module_FullVersion SETS "1.20"
Module_HelpVersion SETS "1.20 (14 Jan 2012)"
Module_FullVersion SETS "1.21"
Module_HelpVersion SETS "1.21 (11 Aug 2012)"
END
/* (1.20)
/* (1.21)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.20
#define Module_MajorVersion_CMHG 1.21
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2012
#define Module_Date_CMHG 11 Aug 2012
#define Module_MajorVersion "1.20"
#define Module_Version 120
#define Module_MajorVersion "1.21"
#define Module_Version 121
#define Module_MinorVersion ""
#define Module_Date "14 Jan 2012"
#define Module_Date "11 Aug 2012"
#define Module_ApplicationDate "14-Jan-12"
#define Module_ApplicationDate "11-Aug-12"
#define Module_ComponentName "Draw"
#define Module_ComponentPath "castle/RiscOS/Sources/Apps/Draw"
#define Module_FullVersion "1.20"
#define Module_HelpVersion "1.20 (14 Jan 2012)"
#define Module_LibraryVersionInfo "1:20"
#define Module_FullVersion "1.21"
#define Module_HelpVersion "1.21 (11 Aug 2012)"
#define Module_LibraryVersionInfo "1:21"
......@@ -1917,19 +1917,21 @@ static BOOL exportJPEG (diagrec *diag, char *filename, fileIO_method method,
{ int ok = TRUE, f;
draw_objptr hdrptr;
void *jpegptr;
ftracef0 ("draw_file: exportJPEG\n");
claim_xfersend (diag, method, maxbuf);
hdrptr.bytep = diag->paper + draw_selection->array [0];
jpegptr = &hdrptr.jpegp->image;
/*Create and open the file*/
if ((ok = open_save (filename, FileType_JPEG, 0, &f)) == FALSE)
goto finish;
/* Save the data. */
if ((ok = draw_file_write_bytes (f, (char **)&hdrptr.jpegp->image, 0, hdrptr.jpegp->len)) == FALSE)
if ((ok = draw_file_write_bytes (f, (char **)&jpegptr, 0, hdrptr.jpegp->len)) == FALSE)
goto finish;
finish:
......
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