Skip to content

Commit

Permalink
Support empty option strings
Browse files Browse the repository at this point in the history
  • Loading branch information
17451k committed Jul 5, 2022
1 parent 5975b59 commit 1baf7ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ vector<string> split(string str, char delimiter=' ') {
begin = i + 1;
}
}
result.push_back(str.substr(begin));

if (!str.substr(begin).empty())
result.push_back(str.substr(begin));

return result;
}
Expand Down

0 comments on commit 1baf7ea

Please sign in to comment.