[sword-cvs] sword/src/modules/common swcipher.cpp,1.6,1.7

sword@www.crosswire.org sword@www.crosswire.org
Sun, 30 Mar 2003 17:14:17 -0700


Update of /usr/local/cvsroot/sword/src/modules/common
In directory www:/tmp/cvs-serv4078/src/modules/common

Modified Files:
	swcipher.cpp 
Log Message:
no message

Index: swcipher.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/common/swcipher.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** swcipher.cpp	1 Oct 2002 19:52:40 -0000	1.6
--- swcipher.cpp	31 Mar 2003 00:14:14 -0000	1.7
***************
*** 63,67 ****
  			free(buf);
  			
! 		buf = (char *) malloc(*ilen);
  		memcpy(buf, ibuf, *ilen);
  		len = *ilen;
--- 63,67 ----
  			free(buf);
  			
! 		buf = (char *) malloc(*ilen+1);
  		memcpy(buf, ibuf, *ilen);
  		len = *ilen;
***************
*** 107,112 ****
  	if (cipher) {
  		work = master;
! 		for (int i = 0; i < len; i++)
  			buf[i] = work.decrypt(buf[i]);
  		cipher = false;
  	}
--- 107,114 ----
  	if (cipher) {
  		work = master;
! 		int i;
! 		for (i = 0; i < len; i++)
  			buf[i] = work.decrypt(buf[i]);
+ 		buf[i] = 0;
  		cipher = false;
  	}