summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-11-04 13:58:14 -0500
committerDan Sinclair <dsinclair@chromium.org>2015-11-04 13:58:14 -0500
commit395fbedc65e1261f1fb9189205501f4856235290 (patch)
treeb530b27001c55af76eb513b550ea198b059a35ee /core/src
parent110650e68e519e8cf14fe1119b77cf3309ed2d0b (diff)
downloadpdfium-395fbedc65e1261f1fb9189205501f4856235290.tar.xz
Remove state from RebuildCrossRef state-machine.
The state '12' is only used once. This CL folds the contents of state 12 back into the place where we set our state to 12. This works because all state 12 does is decrement the loop counter so we process the same character again and move us to state 0. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1430643007 .
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index f5ada7c6eb..db0e8b19e1 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -926,17 +926,10 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() {
}
break;
case 11:
- if (byte == '<' && inside_index == 1) {
- status = 12;
- } else if (byte == '>') {
+ if (byte == '>' || (byte == '<' && inside_index == 1))
status = 0;
- }
inside_index = 0;
break;
- case 12:
- --i;
- status = 0;
- break;
case 13:
if (PDFCharIsDelimiter(byte) || PDFCharIsWhitespace(byte)) {
--i;