Skip to content

Commit

Permalink
[FIX-OpenMS#633] ConsoleUtils::breakStrings_ checks for ' ' before ca…
Browse files Browse the repository at this point in the history
…lling String::suffix()

 * updated changelog accordingly



git-svn-id: https://open-ms.svn.sourceforge.net/svnroot/open-ms/branches/Release1.11.1@11976 6adb6e08-d915-0410-941f-83917bcadc18
  • Loading branch information
aiche committed Nov 13, 2013
1 parent ecc5e13 commit 6a515dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TOPP:
- XMLValidator can now be used on mzML files
- fixed bug in MSSimulator/EnzymaticDigestion where amino acid "U" was leading to crash
- fixed some problems with protein modifications in MascotAdapterOnline
- fixed potential problems of TOPP help screens on small screens / small terminal windows

Build system:
- fixed issues with CMake 2.8.12
Expand All @@ -34,7 +35,8 @@ Resolved issues:
#614 Amino acid "U" leads to crash in MSSimulator/EnzymaticDigestion
#629 OpenMS is incompatible with CMake 2.8.12
#630 Knime mime.types file should have lower case mime type names

#633 ConsoleUtils::breakString triggers uncaught exception if terminal size is too small

------------------------------------------------------------------------------------------
---- OpenMS 1.11 ----
------------------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions source/APPLICATIONS/ConsoleUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ namespace OpenMS

// check if we are using the full length and split a word at the same time
// cut a little earlier in that case for nicer looks
//std::cerr << line.size() << " "<< (result.size() == 0 ? line_len : short_line_len) << " " << short_line_len << "\n";
if (line.size() == (result.size() == 0 ? line_len : short_line_len) && short_line_len > 8)
if (line.size() == (result.size() == 0 ? line_len : short_line_len) && short_line_len > 8 && line.rfind(' ') != String::npos)
{
String last_word = line.suffix(' ');
if (last_word.length() < 4)
Expand Down

0 comments on commit 6a515dd

Please sign in to comment.