summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_link.cpp')
-rw-r--r--core/src/fpdfdoc/doc_link.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index c27333e08b..964b84e549 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -56,7 +56,7 @@ CPDF_Link CPDF_LinkList::GetLinkAtPoint(CPDF_Page* pPage, FX_FLOAT pdf_x, FX_FLO
return NULL;
}
int size = pPageLinkList->GetSize();
- for (int i = 0; i < size; i ++) {
+ for (int i = size - 1; i >= 0; --i) {
CPDF_Link Link = (CPDF_Dictionary*)pPageLinkList->GetAt(i);
CPDF_Rect rect = Link.GetRect();
if (rect.Contains(pdf_x, pdf_y)) {