[sword-cvs] sword/src/mgr swmgr.cpp,1.93,1.94

sword@www.crosswire.org sword@www.crosswire.org
Wed, 13 Aug 2003 17:57:40 -0700


Update of /usr/local/cvsroot/sword/src/mgr
In directory www:/tmp/cvs-serv3180/src/mgr

Modified Files:
	swmgr.cpp 
Log Message:
no message

Index: swmgr.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/mgr/swmgr.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- swmgr.cpp	5 Jul 2003 04:58:42 -0000	1.93
+++ swmgr.cpp	14 Aug 2003 00:57:38 -0000	1.94
@@ -272,7 +272,8 @@
 	init();
 	
 	path = iConfigPath;
-	if ((iConfigPath[strlen(iConfigPath)-1] != '\\') && (iConfigPath[strlen(iConfigPath)-1] != '/'))
+	int len = strlen(iConfigPath);
+	if ((len < 1) || (iConfigPath[len-1] != '\\') && (iConfigPath[len-1] != '/'))
 		path += "/";
 	if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
 		stdstr(&prefixPath, path.c_str());