diff options
author | rowanbeentje <rowan@beent.je> | 2013-03-05 23:59:02 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-03-05 23:59:02 +0000 |
commit | aa7d26a28f9609963478ffdebaf6b8ffcde32bcd (patch) | |
tree | 100d4db43cf699c79cfb6573fe616f660bc62aeb | |
parent | b5742523d753e23a28b1a1de60757a782989cd26 (diff) | |
download | sequelpro-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
-rw-r--r-- | Source/SPSQLParser.m | 2 |
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; |