diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-30 01:48:58 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-30 01:48:58 +0000 |
commit | 3afd25bf7e57ee467b4beec8041601bec277e9d1 (patch) | |
tree | e2809168e1d3d1424ffc38158e85bc362ccfc2bc /crawl-ref/source/chardump.cc | |
parent | 3c0284d1433462f05fa7bb304d5f8ce5f0f21eaf (diff) | |
download | crawl-ref-3afd25bf7e57ee467b4beec8041601bec277e9d1.tar.gz crawl-ref-3afd25bf7e57ee467b4beec8041601bec277e9d1.zip |
Fix for 1726595: notes composed only of whitespace caused a crash.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1492 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r-- | crawl-ref/source/chardump.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index d9ea019a87..003a71105d 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -995,6 +995,8 @@ void display_notes() return; linebreak_string(suffix, spaceleft - 4, spaceleft); std::vector<std::string> parts = split_string("\n", suffix); + if ( parts.size() == 0 ) // disregard empty notes + continue; scr.add_entry(new MenuEntry(prefix + parts[0])); for ( unsigned int j = 1; j < parts.size(); ++j ) scr.add_entry(new MenuEntry(std::string(prefix.length()-2, ' ') + |