Commit deee0951 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix null pointer dereference on startup. Pass command line options through to VIDC plugin.

Detail:
  c/main - Command line parsing now checks if enough arguments exist before attempting to look for an -openat option
  Resources/UK/!Run,feb - Now passes any command line options through to the VIDC-era plugin if we decide to launch that instead of ourselves
Admin:
  Tested on Raspberry Pi with high processor vectors


Version 2.05. Tagged as 'SndSetup-2_05'
parent e3976248
...@@ -2,7 +2,7 @@ IF "<Choices$Write>" = "" OR "<Boot$Path>" = "" THEN Error No Boot application a ...@@ -2,7 +2,7 @@ IF "<Choices$Write>" = "" OR "<Boot$Path>" = "" THEN Error No Boot application a
IfThere <Obey$Dir>.VIDC.!SndSetup.!Run Then Set SndSetup$VIDC True Else Set SndSetup$VIDC False IfThere <Obey$Dir>.VIDC.!SndSetup.!Run Then Set SndSetup$VIDC True Else Set SndSetup$VIDC False
RMEnsure SoundControl 1.00 If "<SndSetup$VIDC>"="True" Then Run <Obey$Dir>.VIDC.!SndSetup.!Run RMEnsure SoundControl 1.00 If "<SndSetup$VIDC>"="True" Then Run <Obey$Dir>.VIDC.!SndSetup.!Run %*0
RMEnsure SoundControl 1.00 If "<SndSetup$VIDC>"="True" Then Obey RMEnsure SoundControl 1.00 If "<SndSetup$VIDC>"="True" Then Obey
RMEnsure UtilityModule 5.03 Error This version of SndSetup requires RISC OS 5.03 or later RMEnsure UtilityModule 5.03 Error This version of SndSetup requires RISC OS 5.03 or later
......
/* (2.04) /* (2.05)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 2.04 #define Module_MajorVersion_CMHG 2.05
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 21 Jan 2012 #define Module_Date_CMHG 27 Jun 2012
#define Module_MajorVersion "2.04" #define Module_MajorVersion "2.05"
#define Module_Version 204 #define Module_Version 205
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "21 Jan 2012" #define Module_Date "27 Jun 2012"
#define Module_ApplicationDate "21-Jan-12" #define Module_ApplicationDate "27-Jun-12"
#define Module_ComponentName "SndSetup" #define Module_ComponentName "SndSetup"
#define Module_ComponentPath "castle/RiscOS/Sources/SystemRes/Configure2/PlugIns/SndSetup" #define Module_ComponentPath "castle/RiscOS/Sources/SystemRes/Configure2/PlugIns/SndSetup"
#define Module_FullVersion "2.04" #define Module_FullVersion "2.05"
#define Module_HelpVersion "2.04 (21 Jan 2012)" #define Module_HelpVersion "2.05 (27 Jun 2012)"
#define Module_LibraryVersionInfo "2:4" #define Module_LibraryVersionInfo "2:5"
...@@ -413,7 +413,7 @@ int main(int argc, char *argv[]) ...@@ -413,7 +413,7 @@ int main(int argc, char *argv[])
int openat_y = -1; int openat_y = -1;
/* Have we been passed any co-ordinates to open at? */ /* Have we been passed any co-ordinates to open at? */
if (strcmp(argv[1], "-openat")==0) if ((argc >= 4) && (strcmp(argv[1], "-openat")==0))
{ {
openat_x = atoi(argv[2]); openat_x = atoi(argv[2]);
openat_y = atoi(argv[3]); openat_y = atoi(argv[3]);
......
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