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