From 4231cc9608128cb87f6313cf62b0a8a7ad400571 Mon Sep 17 00:00:00 2001 From: iska Date: Wed, 8 Apr 2015 20:39:33 +0200 Subject: [PATCH] Fix scanning input stream upto a given string The consumed string variable should not be initialized so that it stays nil if nothing was scanned --- HTMLKit/HTMLInputStreamReader.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTMLKit/HTMLInputStreamReader.m b/HTMLKit/HTMLInputStreamReader.m index 72b4644..9f4878a 100644 --- a/HTMLKit/HTMLInputStreamReader.m +++ b/HTMLKit/HTMLInputStreamReader.m @@ -185,7 +185,7 @@ - (NSString *)consumeCharactersUpToString:(NSString *)string { - NSString *consumed = [NSString string]; + NSString *consumed; [_scanner scanUpToString:string intoString:&consumed]; _location = _scanner.scanLocation; return consumed;