diff options
author | rowanbeentje <rowan@beent.je> | 2009-12-29 21:14:17 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-12-29 21:14:17 +0000 |
commit | 7753ee58924ee3d8da9177a1c318a28dd0bcd6d9 (patch) | |
tree | c9b87947e77adfdb5307884ac5fb90050a7438e2 /Source/CustomQuery.m | |
parent | b7bfae119265c7b09dad7160175844198c9289bc (diff) | |
download | sequelpro-7753ee58924ee3d8da9177a1c318a28dd0bcd6d9.tar.gz sequelpro-7753ee58924ee3d8da9177a1c318a28dd0bcd6d9.tar.bz2 sequelpro-7753ee58924ee3d8da9177a1c318a28dd0bcd6d9.zip |
- Improve line selection for certain errors ending in numbers, and safety-check selections to prevent crashes. This should address Issue #511.
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 137ac017..17763ddd 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -631,7 +631,7 @@ // set the error text [errorText setStringValue:errors]; // select the line x of the first error if error message contains "at line x" - NSRange errorLineNumberRange = [errors rangeOfRegex:@"([0-9]+)$" options:RKLNoOptions inRange:NSMakeRange(0, [errors length]) capture:1 error:nil]; + NSRange errorLineNumberRange = [errors rangeOfRegex:@"(?<!key )([0-9]+)$" options:RKLNoOptions inRange:NSMakeRange(0, [errors length]) capture:1 error:nil]; if(errorLineNumberRange.length) // if a line number was found { // Get the line number |