summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box_construct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index df7aedafc..e0b1f50c8 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2399,7 +2399,8 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password)
box->gadget->box = box;
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "maxlength"))) {
- box->gadget->maxlength = atoi(s);
+ if (s[0] != '\0')
+ box->gadget->maxlength = atoi(s);
xmlFree(s);
}