From 7e704ee2010db58aea1aca88353992d4cf5c6dd1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 6 Oct 2020 21:57:22 -0500 Subject: [PATCH] Trim the IP address string from the user --- Limelight/ViewControllers/MainFrameViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 1355d73..f58cd90 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -535,7 +535,7 @@ static NSMutableSet* hostList; UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"Add Host Manually" message:@"If Moonlight doesn't find your local gaming PC automatically,\nenter the IP address of your PC" preferredStyle:UIAlertControllerStyleAlert]; [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ - NSString* hostAddress = ((UITextField*)[[alertController textFields] objectAtIndex:0]).text; + NSString* hostAddress = [((UITextField*)[[alertController textFields] objectAtIndex:0]).text trim]; [self showLoadingFrame:^{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ [self->_discMan discoverHost:hostAddress withCallback:^(TemporaryHost* host, NSString* error){