]> git.saurik.com Git - wxWidgets.git/commitdiff
prevent checking for empty string
authorRobin Dunn <robin@alldunn.com>
Thu, 15 Jan 2004 23:34:18 +0000 (23:34 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 15 Jan 2004 23:34:18 +0000 (23:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/maskededit.py

index 3b1630e153609a3870240e444f5253d1eb00e5e0..9eaf4b969c805925a25f5071b3e36cbf4c799a87 100644 (file)
@@ -4444,7 +4444,8 @@ class MaskedEditMixin:
                 dbg('text: "%s"' % text)
                 if self._signOk:
                     signpos = self._decimalpos - (len(text[:self._decimalpos].lstrip()) + 1)
-                    if text[signpos+1] in ('-','('):
+                   # prevent checking for empty string - Tomo - Wed 14 Jan 2004 03:19:09 PM CET
+                    if len(text) >= signpos+1 and  text[signpos+1] in ('-','('):
                         signpos += 1
                 else:
                     signpos = -1