From 6fb466d5662b5cee25dd697d1d44efed7f3d5595 Mon Sep 17 00:00:00 2001 From: ruri Date: Tue, 1 Oct 2019 14:41:36 +0200 Subject: [PATCH] Skipping blank lines in automatic wordlist type recognition. --- OpenBullet/Pages/Main/WordlistManager.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBullet/Pages/Main/WordlistManager.xaml.cs b/OpenBullet/Pages/Main/WordlistManager.xaml.cs index a430d4f..e8b1f08 100644 --- a/OpenBullet/Pages/Main/WordlistManager.xaml.cs +++ b/OpenBullet/Pages/Main/WordlistManager.xaml.cs @@ -148,7 +148,7 @@ namespace OpenBullet var wordlist = new Wordlist(Path.GetFileNameWithoutExtension(file), path, Globals.environment.WordlistTypes.First().Name, ""); // Get the first line - var first = File.ReadLines(wordlist.Path).First(); + var first = File.ReadLines(wordlist.Path).First(l => !string.IsNullOrWhiteSpace(l)); // Set the correct wordlist type wordlist.Type = Globals.environment.RecognizeWordlistType(first);