[sword-cvs] sword/src/mgr swmgr.cpp,1.101,1.102

sword@www.crosswire.org sword@www.crosswire.org
Tue, 30 Mar 2004 13:05:10 -0700


Update of /cvs/core/sword/src/mgr
In directory www:/tmp/cvs-serv16739/src/mgr

Modified Files:
	swmgr.cpp 
Log Message:
fix for the swmgr patch (joachim)

Index: swmgr.cpp
===================================================================
RCS file: /cvs/core/sword/src/mgr/swmgr.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- swmgr.cpp	30 Mar 2004 19:35:15 -0000	1.101
+++ swmgr.cpp	30 Mar 2004 20:05:08 -0000	1.102
@@ -588,8 +588,8 @@
 	if ((dir = opendir(ipath))) {
 		rewinddir(dir);
 		while ((ent = readdir(dir))) {
-			//chck whether it ends with .conf, if it doesn't skip it!
-			if (strncmp(".conf", (ent->d_name + strlen(ent->d_name) - 5), 5 )) {
+			//check whether it ends with .conf, if it doesn't skip it!
+			if (ent->d_name && (strlen(ent->d_name) > 5) && strncmp(".conf", (ent->d_name + strlen(ent->d_name) - 5), 5 )) {
 				continue;
 			}