From 78aaf1b4b523270bb1c9430a718fde54d6da29af Mon Sep 17 00:00:00 2001 From: rfm Date: Fri, 12 May 2006 15:37:03 +0000 Subject: [PATCH] Clean quoting code a little git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@22917 72102866-910b-0410-8b05-ffd578937521 --- SQLClient.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SQLClient.m b/SQLClient.m index ea0bc35..0788825 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -858,7 +858,7 @@ static void quoteString(NSMutableString *s) if (c == 0) { r.length = 1; - [s replaceCharactersInRange: r withString: nil]; + [s replaceCharactersInRange: r withString: @""]; l--; } else @@ -1696,11 +1696,15 @@ static void quoteString(NSMutableString *s) if ([v length] == 0) { v = alt; + if (v == nil) + { + v = @""; + } } vLength = [v length]; [mtext replaceCharactersInRange: r withString: v]; - l += vLength; // Add length of string inserted + l += vLength; // Add length of string inserted l -= r.length; // Remove length of string replaced r.location += vLength;