From cfcc5287db2745ece3baf218b472bff5fbc9094a Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 4 Jun 2017 09:46:29 -0400 Subject: [PATCH] Fix bad assumption that there is always a zero'th group. --- platform-darwin/Source/iOS/MPSitesViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-darwin/Source/iOS/MPSitesViewController.m b/platform-darwin/Source/iOS/MPSitesViewController.m index b96ea167..eb85d524 100644 --- a/platform-darwin/Source/iOS/MPSitesViewController.m +++ b/platform-darwin/Source/iOS/MPSitesViewController.m @@ -89,7 +89,7 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) { pasteboardURL = [NSURL URLWithString:pasteboard.string]; if (pasteboardURL.host) - self.query = NSNullToNil( [pasteboardURL.host firstMatchGroupsOfExpression:bareHostRE][0] ); + self.query = NSNullToNil( [[pasteboardURL.host firstMatchGroupsOfExpression:bareHostRE] firstObject] ); else [self reloadSites]; }