# HG changeset patch # User paulb # Date 1121971723 0 # Node ID ee5cd34d453a3ef7fd5642224d51606152163e34 # Parent 7957676261c6037dcb0ca4b8bab7b65011c58a43 [project @ 2005-07-21 18:48:43 by paulb] Fixed a bug handling empty field values. diff -r 7957676261c6 -r ee5cd34d453a XSLForms/Resources.py --- a/XSLForms/Resources.py Thu Jul 21 16:16:50 2005 +0000 +++ b/XSLForms/Resources.py Thu Jul 21 18:48:43 2005 +0000 @@ -94,7 +94,7 @@ if not parameters.has_key(text_name): parameters[text_name] = [] # NOTE: Workaround from posted text. - if text_value[-1] == "\x00": + if len(text_value) > 0 and text_value[-1] == "\x00": text_value = text_value[:-1] parameters[text_name].append(text_value) return parameters