* make shure our cached buffers aren't to big.
authorWilfried Göesgens <willi@citadel.org>
Thu, 4 Jun 2009 21:21:27 +0000 (21:21 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 4 Jun 2009 21:21:27 +0000 (21:21 +0000)
webcit/subst.c

index 6842a99b9b943bdabec2fdd87ac88661bafd5838..8b69b26e000faae3d443f222e6cbf59a2f5c2880 100644 (file)
@@ -1436,6 +1436,7 @@ void *load_template(StrBuf *filename, StrBuf *Key, HashList *PutThere)
        close(fd);
 
        Line = 0;
+       StrBufShrinkToFit(NewTemplate->Data, 1);
        pS = pch = ChrPtr(NewTemplate->Data);
        pE = pS + StrLength(NewTemplate->Data);
        while (pch < pE) {