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 (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
if (ch && strchr(oct_alphabet, ch)) {
|
||||||
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
octal += ch;
|
||||||
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
||||||
if (!octal.empty()) {
|
if (*p && strchr(oct_alphabet, *p)) octal += *p++;
|
||||||
value += char(std::stoi(octal, nullptr, 8));
|
ch = std::stoi(octal, nullptr, 8);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue