aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLParser.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-03-05 23:59:02 +0000
committerrowanbeentje <rowan@beent.je>2013-03-05 23:59:02 +0000
commitaa7d26a28f9609963478ffdebaf6b8ffcde32bcd (patch)
tree100d4db43cf699c79cfb6573fe616f660bc62aeb /Source/SPSQLParser.m
parentb5742523d753e23a28b1a1de60757a782989cd26 (diff)
downloadsequelpro-aa7d26a28f9609963478ffdebaf6b8ffcde32bcd.tar.gz
sequelpro-aa7d26a28f9609963478ffdebaf6b8ffcde32bcd.tar.bz2
sequelpro-aa7d26a28f9609963478ffdebaf6b8ffcde32bcd.zip
- Fix an error parsing SQL inside an unterminated delimiter statement causing an off-by-one error in positioning, addressing Issue #1643
Diffstat (limited to 'Source/SPSQLParser.m')
-rw-r--r--Source/SPSQLParser.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPSQLParser.m b/Source/SPSQLParser.m
index e0abf319..d95d964f 100644
--- a/Source/SPSQLParser.m
+++ b/Source/SPSQLParser.m
@@ -630,7 +630,7 @@ TO_BUFFER_STATE to_scan_string (const char *);
if (supportDelimiters && [finalQuery isMatchedByRegex:@"(?i)^\\s*delimiter\\s+\\S+"])
finalQuery = nil;
if ([finalQuery length])
- [resultsArray addObject:[NSValue valueWithRange:NSMakeRange(stringIndex, [string length] - stringIndex - delimiterLengthMinusOne)]];
+ [resultsArray addObject:[NSValue valueWithRange:NSMakeRange(stringIndex, [string length] - stringIndex)]];
}
return resultsArray;