diff --git a/Source/d_deh.c b/Source/d_deh.c index 83095258..3163a733 100644 --- a/Source/d_deh.c +++ b/Source/d_deh.c @@ -2497,7 +2497,7 @@ void deh_procStrings(DEHFILE *fpin, FILE* fpout, char *line) while (strlen(holdstring) + strlen(inbuffer) > maxstrlen) // Ty03/29/98 - fix stupid error { // killough 11/98: allocate enough the first time - maxstrlen += strlen(holdstring) + strlen(inbuffer) - maxstrlen; + maxstrlen = strlen(holdstring) + strlen(inbuffer); // [FG] fix buffer size calculation if (fpout) fprintf(fpout, "* increased buffer from to %d for buffer size %d\n", maxstrlen,(int)strlen(inbuffer));