Author: mordante
Date: Tue Sep  2 20:05:04 2008
New Revision: 29208

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29208&view=rev
Log:
Small optimization, don't try to copy an empty string.

Modified:
    trunk/src/gui/widgets/text.cpp

Modified: trunk/src/gui/widgets/text.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/text.cpp?rev=29208&r1=29207&r2=29208&view=diff
==============================================================================
--- trunk/src/gui/widgets/text.cpp (original)
+++ trunk/src/gui/widgets/text.cpp Tue Sep  2 20:05:04 2008
@@ -261,6 +261,10 @@
        int length = selection_length_;
        unsigned start = selection_start_;
 
+       if(length == 0) {
+               return;
+       }
+
        if(length < 0) {
                length = - length;
                start -= length;


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

Reply via email to