diff options
author | David Robillard <d@drobilla.net> | 2023-02-28 19:39:35 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-03-31 11:10:52 -0400 |
commit | 002e2edc7fee5297b1bc8e1da4932d38e270f8f8 (patch) | |
tree | e701cf2bcf6663f3b7dd79234b6f3145e4e46f26 /src | |
parent | 647179b76fe15e5306a5a4f7ebbc1ad933d5a526 (diff) | |
download | serd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.tar.gz serd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.tar.bz2 serd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.zip |
Fix incorrect parsing of strange quote escape patterns
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -361,9 +361,15 @@ read_STRING_LITERAL_LONG(SerdReader* const reader, skip_byte(reader, q3); break; } - *flags |= SERD_HAS_QUOTE; - push_byte(reader, ref, c); - st = read_character(reader, ref, flags, (uint8_t)q2); + + if (q2 == '\\') { + push_byte(reader, ref, c); + st = read_string_escape(reader, ref, flags); + } else { + *flags |= SERD_HAS_QUOTE; + push_byte(reader, ref, c); + st = read_character(reader, ref, flags, (uint8_t)q2); + } } else if (c == EOF) { return r_err(reader, SERD_ERR_BAD_SYNTAX, "end of file in long string\n"); } else { |