Fix octal escapes
This commit is contained in:
parent
2d3fd3317b
commit
160f09ecc3
|
@ -136,12 +136,11 @@ struct pdf_lexer {
|
||||||
if (eat_newline(ch))
|
if (eat_newline(ch))
|
||||||
continue;
|
continue;
|
||||||
std::string octal;
|
std::string octal;
|
||||||
|
if (ch && strchr(oct_alphabet, ch)) {
|
||||||
|
octal += ch;
|
||||||
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
||||||
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
||||||
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
ch = std::stoi(octal, nullptr, 8);
|
||||||
if (!octal.empty()) {
|
|
||||||
value += char(std::stoi(octal, nullptr, 8));
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue