saait

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

commit bbeb92b4aff16a77b15252423abd24c4b2fb46ed
parent ea16f6b7c0fe3be5f0d9ee633ea5b4438fa8b034
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat,  8 Sep 2018 17:53:34 +0200

fix undefined behaviour with some ctype functions

this affected NetBSD with inlined ctype functions

Diffstat:
Msaait.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/saait.c b/saait.c @@ -319,13 +319,13 @@ writepage(FILE *fp, const char *file, struct variable *c, char *s) } /* variable case */ - for (; *s && isspace(*s); s++) + for (; *s && isspace((unsigned char)*s); s++) ; key = s; for (keylen = 0; *s && *s != '}'; s++) keylen++; /* trim right whitespace */ - for (; keylen && isspace(key[keylen - 1]); ) + for (; keylen && isspace((unsigned char)key[keylen - 1]); ) keylen--; /* temporary NUL terminate */