1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 11:10:25 +02:00

Fix parsing options from string, doh

This commit is contained in:
Andy Wingo 2023-02-28 09:39:15 +01:00
parent 4cb26e0144
commit f0ad02d6ee

View file

@ -147,7 +147,7 @@ static int is_value_end(char c) { return c == '\0' || c == ','; }
static char* read_token(char *p, int (*is_tok)(char c), int (*is_end)(char c),
char *delim) {
char c;
for (c = *p; is_tok(c); p++);
for (c = *p; is_tok(c); c = *++p);
if (!is_end(c)) return NULL;
*delim = c;
*p = '\0';