From a7557174ae4fcc2b07ca360070c2424e5ff93ad6 Mon Sep 17 00:00:00 2001 From: CK Tan Date: Sun, 11 Apr 2021 15:27:55 -0700 Subject: [PATCH] fix #52 --- toml.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toml.c b/toml.c index 9eeb6e8..f00e48e 100644 --- a/toml.c +++ b/toml.c @@ -1699,8 +1699,11 @@ static int scan_string(context_t* ctx, char* p, int lineno, int dotisspecial) if (*p == '\\') { escape = 1; continue; } if (*p == '\n') break; if (*p == '"') break; - if (*p == '\'' && ++sqcnt == 3) { - return e_syntax(ctx, lineno, "triple-s-quote inside string lit"); + if (*p == '\'') { + if (++sqcnt == 3) { + return e_syntax(ctx, lineno, "triple-s-quote inside string lit"); + } + continue; } sqcnt = 0; }