wingo pushed a commit to branch wip-whippet
in repository guile.

commit f0ad02d6eef99312a3ee633b27fccf66119c7f58
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Tue Feb 28 09:39:15 2023 +0100

    Fix parsing options from string, doh
---
 gc-options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gc-options.c b/gc-options.c
index 77373b170..076c2700f 100644
--- a/gc-options.c
+++ b/gc-options.c
@@ -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';

Reply via email to