aboutsummaryrefslogtreecommitdiff
path: root/pdf-simple-sign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-simple-sign.cpp')
-rw-r--r--pdf-simple-sign.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/pdf-simple-sign.cpp b/pdf-simple-sign.cpp
index 36afcf4..9366daa 100644
--- a/pdf-simple-sign.cpp
+++ b/pdf-simple-sign.cpp
@@ -136,12 +136,11 @@ struct pdf_lexer {
if (eat_newline(ch))
continue;
std::string octal;
- 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 (!octal.empty()) {
- value += char(std::stoi(octal, nullptr, 8));
- continue;
+ if (ch && strchr(oct_alphabet, ch)) {
+ octal += ch;
+ if (*p && strchr(oct_alphabet, *p)) octal += *p++;
+ if (*p && strchr(oct_alphabet, *p)) octal += *p++;
+ ch = std::stoi(octal, nullptr, 8);
}
}
}