summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-form.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c
index 224e8017..20a0d574 100644
--- a/source/pdf/pdf-form.c
+++ b/source/pdf/pdf-form.c
@@ -1061,6 +1061,10 @@ static int run_keystroke(fz_context *ctx, pdf_document *doc, pdf_obj *field, cha
{
pdf_obj *k = pdf_dict_getl(ctx, field, PDF_NAME(AA), PDF_NAME(K), NULL);
+ /* Return 1 on empty string */
+ if (*text[0] == 0)
+ return 1;
+
if (k && doc->js)
{
pdf_js_event e;