summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-11-04 14:05:25 -0500
committerDan Sinclair <dsinclair@chromium.org>2015-11-04 14:05:25 -0500
commit42e0ccfcdd5de93f75448a030efa42182b417cb5 (patch)
tree8f1cb5524f7fff90e6a5dd6f34646bc46bb24a92 /core/src/fpdfapi/fpdf_parser
parentbfe042a4c4f0bd739c568754ebee6d993e134ad3 (diff)
downloadpdfium-42e0ccfcdd5de93f75448a030efa42182b417cb5.tar.xz
Merge to XFA: 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 . (cherry picked from commit 395fbedc65e1261f1fb9189205501f4856235290) Review URL: https://codereview.chromium.org/1414033010 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-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 4ce196e90d..2aea614226 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -925,17 +925,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;