]> https://gitweb.dealii.org/ - dealii.git/commit
empty string in split_string_list fix
authorMFraters <menno.fraters@outlook.com>
Tue, 24 Feb 2015 10:32:07 +0000 (11:32 +0100)
committerMFraters <menno.fraters@outlook.com>
Tue, 24 Feb 2015 10:32:07 +0000 (11:32 +0100)
commit0c5260a9a736df772d3f5847d519e8431f08c532
tree9202968ae9a04523c5a21c8a1d1ec138152a7e20
parentb3222af65c0187f5301e5244b2856f9b274b97d5
empty string in split_string_list fix

When an empty string or a string with only spaces is given to this function, the split_string_list function will ask in line 222 for name[-1], which will result in unpredictable behaviour. I propose to prevent this by adding a condition that the length of the string may not be 0.
source/base/utilities.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.