|
From: Andre R. <and...@us...> - 2006-02-17 18:26:03
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4670/Common/source Modified Files: launch.c shellsysverbs.c Log Message: Fixed OS X crashing bug in sys.getAppPath that was triggered by calling it with a non-existant app name. Index: launch.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/launch.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** launch.c 11 Jan 2005 22:48:08 -0000 1.7 --- launch.c 17 Feb 2006 18:25:56 -0000 1.8 *************** *** 1947,1950 **** --- 1947,1956 ---- 2004-10-26 aradke: New Carbon/Mach-O implementation for obtaining a filespec to our application bundle, i.e. the Frontier.app "folder". + + 2006-02-17 aradke: Clear filespec before doing our thing on Mac too, + so the caller won't crash if he ignores a false return value and + tries to access the filespec anyway. Our only caller with a non-nil + bsprogram currently is sys.getAppPath (shellsysverbs.c) and it does + exactly that. */ *************** *** 1953,1956 **** --- 1959,1964 ---- boolean flsystem7; + clearbytes (fs, sizeof (*fs)); /* 2006-02-17 aradke */ + flsystem7 = (gSystemVersion >= 0x0700); Index: shellsysverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellsysverbs.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shellsysverbs.c 8 Feb 2006 21:35:17 -0000 1.6 --- shellsysverbs.c 17 Feb 2006 18:25:56 -0000 1.7 *************** *** 536,540 **** return (false); ! if (!getapplicationfilespec (bs, &fs)) setemptystring (bs); --- 536,540 ---- return (false); ! if (!getapplicationfilespec (bs, &fs)) /* 2006-02-17 aradke: initializes fs even if it fails */ setemptystring (bs); |