saait

Simple static page generator
git clone https://git.sinitax.com/codemadness/saait
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 82af39e59e13b8ba43a9723eb19fb97b562c1e66
parent 5bd3c655c560c3a69e431e75b9b9386192915194
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  4 Dec 2016 12:42:28 +0100

if value is empty dont read file

Diffstat:
Msaait.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/saait.c b/saait.c @@ -336,9 +336,11 @@ writepage(FILE *fp, const char *filename, struct config *c, char *s) value = v->value; if (op == '%') { - value = readfile(value); - fputs(value, fp); - free(value); + if (value[0]) { + value = readfile(value); + fputs(value, fp); + free(value); + } for (e = s; *e && *e != '}'; e++) ; s = e;