diff options
Diffstat (limited to 'core/fpdfdoc/cpdf_interform.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 29063f534b..af72bd2750 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -428,7 +428,6 @@ class CFieldTree { return m_pField; --*pFieldsToGo; - return nullptr; } for (size_t i = 0; i < GetChildrenCount(); ++i) { CPDF_FormField* pField = GetChildAt(i)->GetFieldInternal(pFieldsToGo); @@ -441,10 +440,11 @@ class CFieldTree { size_t CountFieldsInternal(int nLevel) const { if (nLevel > nMaxRecursion) return 0; - if (m_pField) - return 1; size_t count = 0; + if (m_pField) + ++count; + for (size_t i = 0; i < GetChildrenCount(); ++i) count += GetChildAt(i)->CountFieldsInternal(nLevel + 1); return count; |