Author: mordante
Date: Sun Mar 25 17:23:24 2012
New Revision: 53661

URL: http://svn.gna.org/viewcvs/wesnoth?rev=53661&view=rev
Log:
Handle a newline in a wesmage filter description.

Before it only counted the number of characters causing alignment issues
if there was a newline in the text.

Modified:
    trunk/src/wesmage/options.cpp

Modified: trunk/src/wesmage/options.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/wesmage/options.cpp?rev=53661&r1=53660&r2=53661&view=diff
==============================================================================
--- trunk/src/wesmage/options.cpp (original)
+++ trunk/src/wesmage/options.cpp Sun Mar 25 17:23:24 2012
@@ -64,7 +64,11 @@
        }
 
        while(!description.empty()) {
-               if(description.size() <= description_length) {
+               size_t eol = description.find('\n');
+               if(eol <= description_length) {
+                       stream << description.substr(0, eol);
+                       description.erase(0, eol + 1);
+               } else if(description.size() <= description_length) {
                        stream << description;
                        description.clear();
                } else {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to