43b9303
diff --git a/src/formisc.c b/src/formisc.c
43b9303
index 5c2869d..54fd013 100644
43b9303
--- a/src/formisc.c
43b9303
+++ b/src/formisc.c
43b9303
@@ -103,7 +103,7 @@ void loadsaved(sp)const struct saved*const sp;	     /* load some saved text */
43b9303
 }
43b9303
 							    /* append to buf */
43b9303
 void loadbuf(text,len)const char*const text;const size_t len;
43b9303
-{ if(buffilled+len>buflen)			  /* buf can't hold the text */
43b9303
+{ while(buffilled+len>buflen)			  /* buf can't hold the text */
43b9303
      buf=realloc(buf,buflen+=Bsize);
43b9303
   tmemmove(buf+buffilled,text,len);buffilled+=len;
43b9303
 }