mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-15 08:01:33 +00:00
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:
parent
2731b9ee3f
commit
9e7142bde6
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue