[Pkg-mc-commits] r124 - trunk/debian/patches

winnie at alioth.debian.org winnie at alioth.debian.org
Thu Mar 6 08:31:51 UTC 2008


Author: winnie
Date: 2008-03-06 08:31:50 +0000 (Thu, 06 Mar 2008)
New Revision: 124

Modified:
   trunk/debian/patches/61_escaping.patch
Log:
We have to allocate everytime one more byte... 


Modified: trunk/debian/patches/61_escaping.patch
===================================================================
--- trunk/debian/patches/61_escaping.patch	2008-03-05 21:31:20 UTC (rev 123)
+++ trunk/debian/patches/61_escaping.patch	2008-03-06 08:31:50 UTC (rev 124)
@@ -16,7 +16,7 @@
 +	local = g_malloc(j);
 +	
 +	for (i=0;i<=strlen(in);i++) {
-+		if (i-k >= j ) {
++		if (i-k+1 >= j ) {
 +			j = j + 20;
 +			local = g_realloc(local,j);
 +		}
@@ -28,7 +28,7 @@
 +		}
 +	}
 +	local[i-k] = '\0';
-+		
++	
 +	return local;
 +}
 +
@@ -44,7 +44,7 @@
 +	local = g_malloc(j);
 +
 +	for (i=0;i<strlen(in);i++) {
-+		if (i+k >= j ) { //If 20 chars is too low for the path
++		if (i+k+1 >= j ) { //If 20 chars is too low for the path
 +			j = j + 20;
 +			local = g_realloc(local,j);
 +		}




More information about the Pkg-mc-commits mailing list