Author: esr
Date: Thu Sep 11 12:14:03 2008
New Revision: 29389

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29389&view=rev
Log:
Fix odd little edge case in comment handling.

Modified:
    trunk/data/tools/wesnoth/wmltools.py

Modified: trunk/data/tools/wesnoth/wmltools.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=29389&r1=29388&r2=29389&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Thu Sep 11 12:14:03 2008
@@ -52,10 +52,11 @@
     after = after.lstrip()
     if "#" in after:
         where = after.find("#")
-        while after[where-1] in (" ", "\t"):
+        where -= 1
+        while after[where] in (" ", "\t"):
             where -= 1
         value = after[:where+1]
-        comment = after[where:]
+        comment = after[where+1:]
     else:
         value = after.rstrip()
         comment = ""


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

Reply via email to