prevent checking for empty string

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-01-15 23:34:18 +00:00
parent 87d562652e
commit 50940aad97

View 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