]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid a problem where we were accidentally accessing a string beyond its end...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Sep 2008 15:52:31 +0000 (15:52 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Sep 2008 15:52:31 +0000 (15:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@16767 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/expand_instantiations.cc

index f164901dc0f05c1e6453c8c00c014402635920ab..26f984dd7782c599f9fcad9b956f36451b39807c 100644 (file)
@@ -143,7 +143,7 @@ split_string_list (const std::string &s,
 
       skip_space (name);
 
-      while (name[name.length()-1] == ' ')
+      while ((name.size() != 0) && (name[name.length()-1] == ' '))
        name.erase (name.length()-1, 1);
 
       split_list.push_back (name);

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.