Fix typo in cpdf_occontext.cpp
Use loop index `i` as intended instead of literal `1`.
The change is detected by one file in the corpus which is updated
along with the code.
Bug: pdfium:1624
Change-Id: Id6b5bcf713e6844776585a5d1eabe49e4e174c26
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/77290
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Hui Yingst <nigi@chromium.org>
diff --git a/DEPS b/DEPS
index f8dfb1a..b9ef6e4 100644
--- a/DEPS
+++ b/DEPS
@@ -89,7 +89,7 @@
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling pdfium_tests
# and whatever else without interference from each other.
- 'pdfium_tests_revision': '79c60bac7af87b386fd3df557eb782383e612a3a',
+ 'pdfium_tests_revision': 'db1faf0ee5ab4e8be140dc1c0fc0031ab70a817c',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling skia
# and whatever else without interference from each other.
diff --git a/core/fpdfapi/page/cpdf_occontext.cpp b/core/fpdfapi/page/cpdf_occontext.cpp
index a5751b0..aa84b97 100644
--- a/core/fpdfapi/page/cpdf_occontext.cpp
+++ b/core/fpdfapi/page/cpdf_occontext.cpp
@@ -214,7 +214,7 @@
bool bValue = false;
for (size_t i = 1; i < pExpression->size(); i++) {
- const CPDF_Object* pOCGObj = pExpression->GetDirectObjectAt(1);
+ const CPDF_Object* pOCGObj = pExpression->GetDirectObjectAt(i);
if (!pOCGObj)
continue;