[sword-cvs] sword/src/mgr filemgr.cpp,1.35,1.36

sword@www.crosswire.org sword@www.crosswire.org
Sat, 17 Jan 2004 11:38:08 -0700


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

Modified Files:
	filemgr.cpp 
Log Message:
no message

Index: filemgr.cpp
===================================================================
RCS file: /cvs/core/sword/src/mgr/filemgr.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- filemgr.cpp	17 Jan 2004 07:00:08 -0000	1.35
+++ filemgr.cpp	17 Jan 2004 18:38:06 -0000	1.36
@@ -381,7 +381,7 @@
 				break;
 		}
 		
-		int size = (lseek(fDesc->getFd(), 0, SEEK_CUR) - index) - 1;
+		int size = (lseek(fDesc->getFd(), 0, SEEK_CUR) - index) - len;
 
 		buf = new char [ size + 1 ];
 
@@ -391,9 +391,8 @@
 			read(fDesc->getFd(), &ch, 1);   //pop terminating char
 			buf[size] = 0;
 
-			more = (line[line.length()-1] == '\\');
 			// clean up any trailing junk on buf
-			for (char *it = buf+(strlen(buf)-1); it > buf; it--) {
+			for (char *it = buf+(strlen(buf)); it > buf; it--) {
 				if ((*it != 10) && (*it != 13) && (*it != ' ') && (*it != '\t')) {
 					if (*it == '\\')
 						more = true;