Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on empty lines #49

Open
FalcoGer opened this issue Jul 25, 2022 · 0 comments
Open

Crashes on empty lines #49

FalcoGer opened this issue Jul 25, 2022 · 0 comments

Comments

@FalcoGer
Copy link

FalcoGer commented Jul 25, 2022

When given an input file with an empty line, the application crashes with an uncaught exception.

$ echo "1\n2\n3\n" > crash.txt
$ untwister -i crash.txt
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 0) >= this->size() (which is 0)
[1]    1160017 IOT instruction (core dumped)  untwister -i crash.txt
$ echo "1\n\n2\n3\n4" > crash2.txt
$ untwister -i crash2.txt
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 0) >= this->size() (which is 0)
[1]    1160344 IOT instruction (core dumped)  untwister -i crash2.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant