Skip to content

Commit 17738d4

Browse files
authored
Merge pull request #11 from six2dez/patch-2
Fix for #8
2 parents a1511fa + 2cd0c97 commit 17738d4

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

main.cpp

+20-13
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@ bool is_number_signed(const std::string &);
4545
int count_char(string domain, char character);
4646
vector<string> split(const string &, char);
4747

48-
void print_header()
49-
{
50-
// courtesy of http://www.patorjk.com/software/taag/#p=display&f=Epic&t=FastSub
51-
std::string header = R"sep(
48+
void print_header()
49+
{
50+
// courtesy of http://www.patorjk.com/software/taag/#p=display&f=Epic&t=FastSub
51+
std::string header = R"sep(
5252
5353
▓█████▄ ███▄ █ ██████ ▄████▄ ▓█████ █ █░ ██▓
5454
▒██▀ ██▌ ██ ▀█ █ ▒██ ▒ ▒██▀ ▀█ ▓█ ▀ ▓█░ █ ░█░▓██▒
5555
░██ █▌▓██ ▀█ ██▒░ ▓██▄ ▒▓█ ▄ ▒███ ▒█░ █ ░█ ▒██░
5656
░▓█▄ ▌▓██▒ ▐▌██▒ ▒ ██▒▒▓▓▄ ▄██▒▒▓█ ▄ ░█░ █ ░█ ▒██░
5757
░▒████▓ ▒██░ ▓██░▒██████▒▒▒ ▓███▀ ░░▒████▒░░██▒██▓ ░██████▒
58-
▒▒▓ ▒ ░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░░ ▒░ ░░ ▓░▒ ▒ ░ ▒░▓ ░
59-
60-
Michael Skelton (@codingo_)
61-
Luke Stephens (@hakluke)
62-
Sajeeb Lohani (@sml555_)
63-
)sep";
64-
spdlog::info("{}\n", header);
58+
▒▒▓ ▒ ░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░░ ▒░ ░░ ▓░▒ ▒ ░ ▒░▓ ░
59+
60+
Michael Skelton (@codingo_)
61+
Luke Stephens (@hakluke)
62+
Sajeeb Lohani (@sml555_)
63+
)sep";
64+
spdlog::info("{}\n", header);
6565
}
6666

6767
int main(int argc, char **argv)
@@ -129,7 +129,14 @@ void process_range()
129129
{
130130
if (is_number(*split))
131131
{
132-
int n = stoi(*split);
132+
int n;
133+
try {
134+
n = stoi(*split);
135+
}
136+
catch (...) {
137+
continue;
138+
}
139+
//int n = stoi(*split);
133140
int lower = 0;
134141
int upper = 0;
135142
if (range == 0)
@@ -512,4 +519,4 @@ void error_fatal(string message)
512519
{
513520
spdlog::error("ERROR: {}. Exiting", message);
514521
exit(1);
515-
}
522+
}

0 commit comments

Comments
 (0)