stacinhtml

Static C in HTML - simple static site generator
git clone git://git.kocotian.pl/stacinhtml.git
Log | Files | Refs | README | LICENSE

commit 8c150c906aa8db2d1b9c4e2c0bd663eb1e36f4dd
parent 92e88c1ce18e37e7c171ef0c06fb0e6aa7a7a887
Author: kocotian <kocotian@kocotian.pl>
Date:   Tue, 23 Mar 2021 08:24:08 +0100

Fixed segmentation fault with NULL

Diffstat:
Mcompile.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compile.c b/compile.c @@ -34,7 +34,7 @@ #define $(VARNAME) getVariableValue(#VARNAME) #define DECLVAR(VARNAME, VALUE) \ (vs[vss].name.len = strlen(vs[vss].name.data = #VARNAME), \ - vs[vss].value.len = strlen(vs[vss].value.data = VALUE), \ + vs[vss].value.len = strlen(vs[vss].value.data = VALUE == NULL ? "<null>" : VALUE), \ ++vss) #define BUFFER_SIZE 64 * 1024 #define VS_MAX 256