This commit is contained in:
CK Tan 2021-04-11 15:27:55 -07:00
parent e9bfb63807
commit a7557174ae

5
toml.c
View file

@ -1699,9 +1699,12 @@ static int scan_string(context_t* ctx, char* p, int lineno, int dotisspecial)
if (*p == '\\') { escape = 1; continue; } if (*p == '\\') { escape = 1; continue; }
if (*p == '\n') break; if (*p == '\n') break;
if (*p == '"') break; if (*p == '"') break;
if (*p == '\'' && ++sqcnt == 3) { if (*p == '\'') {
if (++sqcnt == 3) {
return e_syntax(ctx, lineno, "triple-s-quote inside string lit"); return e_syntax(ctx, lineno, "triple-s-quote inside string lit");
} }
continue;
}
sqcnt = 0; sqcnt = 0;
} }
if (*p != '"') { if (*p != '"') {