~ft/pdffs

b22596ba7641a3f996b53ced14906e212a84220e — Noam Preil 9 months ago 18644a4
parse: ignore escaped newlines in strings
1 files changed, 6 insertions(+), 1 deletions(-)

M string.c
M string.c => string.c +6 -1
@@ 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;