aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-03-09 00:00:43 +0100
committerMax <post@wickenrode.com>2015-03-09 00:00:43 +0100
commit784876380b871b6d85978a705e2477e7b7d2d984 (patch)
tree5705e92b0aab9fecdf7d37954f5a0c3e873de1ff /Source/SPCustomQuery.m
parentb15c7fb2d407ec8751a2579a7a68bbd8a037ccfe (diff)
downloadsequelpro-784876380b871b6d85978a705e2477e7b7d2d984.tar.gz
sequelpro-784876380b871b6d85978a705e2477e7b7d2d984.tar.bz2
sequelpro-784876380b871b6d85978a705e2477e7b7d2d984.zip
Minimal refactoring
Replaced some (range.location + range.length) with NSMaxRange(range)
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 8b3897fe..70ff07ff 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3152,7 +3152,7 @@
aRange = NSMakeRange(0,0);
NSInteger safeCnt = 0; // safety counter - not more than 200 loops allowed
while(1){
- aRange = [desc rangeOfRegex:@"\\s((https?|ftp|file)://.*?html)" options:RKLNoOptions inRange:NSMakeRange(aRange.location+aRange.length, [desc length]-aRange.location-aRange.length) capture:1 error:&err1];
+ aRange = [desc rangeOfRegex:@"\\s((https?|ftp|file)://.*?html)" options:RKLNoOptions inRange:NSMakeRange(NSMaxRange(aRange), [desc length]-aRange.location-aRange.length) capture:1 error:&err1];
if(aRange.location != NSNotFound) {
aUrl = [desc substringWithRange:aRange];
[desc replaceCharactersInRange:aRange withString:[NSString stringWithFormat:@"<a href='%@'>%@</a>", aUrl, aUrl]];