diff --git a/function.c b/function.c
index 0552cd1e..e543a913 100644
--- a/function.c
+++ b/function.c
@@ -527,7 +527,7 @@ expand_function (o, function, text, end)
 	  {
 	    if (wordi >= nwords - 1)
 	      {
-		nwords += 5;
+		nwords *= 2;
 		words = (char **) xrealloc ((char *) words,
 					    nwords * sizeof (char *));
 	      }