summaryrefslogtreecommitdiff
path: root/gawkmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gawkmisc.c')
-rw-r--r--gawkmisc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gawkmisc.c b/gawkmisc.c
index a729d88d..0172a810 100644
--- a/gawkmisc.c
+++ b/gawkmisc.c
@@ -52,6 +52,8 @@ pointer
xmalloc(size_t bytes)
{
pointer p;
+ if (bytes == 0)
+ bytes = 1; /* avoid dfa.c mishegos */
emalloc(p, pointer, bytes, "xmalloc");
return p;
}