Clean quoting code a little

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@22917 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-05-12 15:37:03 +00:00
parent 2731b9ee3f
commit 9e7142bde6

View file

@ -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;