From b22596ba7641a3f996b53ced14906e212a84220e Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Wed, 30 Nov 2022 16:10:26 +0000 Subject: [PATCH] parse: ignore escaped newlines in strings --- string.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/string.c b/string.c index 0b5d297..53914d5 100644 --- a/string.c +++ b/string.c @@ -99,7 +99,12 @@ pdfstring(Stream *stream) c = strtol(oct, nil, 8); }else if(c <= nelem(esc) && esc[c] != 0){ c = esc[c]; - }else if(c < 0){ + }else if(c == '\r'){ + c = Sgetc(stream); + if(c != '\n') + Sungetc(stream); + continue; + }else if(c == '\n' || c < 0){ continue; } break; -- 2.38.5