Index: core/src/fpdfdoc/doc_formfield.cpp |
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp |
index 1a6fc3d6d991dd2d0d98dca988f06425f8c701ed..8b644e4f93fda2aa51771b9a8430055bd0d6acc7 100644 |
--- a/core/src/fpdfdoc/doc_formfield.cpp |
+++ b/core/src/fpdfdoc/doc_formfield.cpp |
@@ -472,14 +472,15 @@ int CPDF_FormField::GetSelectedIndex(int index) |
return -1; |
} |
} |
+ if (pValue->GetType() == PDFOBJ_NUMBER) { |
+ return pValue->GetInteger(); |
+ } |
CFX_WideString sel_value; |
if (pValue->GetType() == PDFOBJ_STRING) { |
if (index != 0) { |
return -1; |
} |
sel_value = pValue->GetUnicodeText(); |
- } else if (pValue->GetType() == PDFOBJ_NUMBER) { |
- return pValue->GetInteger(); |
} else { |
if (pValue->GetType() != PDFOBJ_ARRAY) { |
return -1; |