sal/rtl/bootstrap.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 766280b8ebbb61d4c06828322575911839adb7ce Author: Douglas Mencken <[email protected]> Date: Wed Apr 13 20:54:48 2016 -0400 fix case when fileName lacks "/MacOS/" Change-Id: Ic89d1c3be1939c8989ad5ee806980e8904f8e44d Reviewed-on: https://gerrit.libreoffice.org/24069 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Stephan Bergmann <[email protected]> diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index 030afe4..8530e73 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -270,8 +270,9 @@ static OUString & getIniFileName_Impl() #ifdef MACOSX // We keep only executables in the MacOS folder, and all // rc files in LIBO_ETC_FOLDER (typically "Resources"). - sal_Int32 p = fileName.lastIndexOf( "/MacOS/" ); - fileName = fileName.replaceAt( p+1, strlen("MacOS"), LIBO_ETC_FOLDER ); + sal_Int32 off = fileName.lastIndexOf( "/MacOS/" ); + if ( off != -1 ) + fileName = fileName.replaceAt( off + 1, strlen("MacOS"), LIBO_ETC_FOLDER ); #endif } #endif _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
