Skip to content

Commit

Permalink
fix: The file-manager crashed during parsing some files
Browse files Browse the repository at this point in the history
Array overreach

Bug: https://pms.uniontech.com/bug-view-242601.html
Log: fix bug
  • Loading branch information
Kakueeen committed Feb 5, 2024
1 parent 468225b commit 2a5f600
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 3rdparty/libs/fileext/excel/formula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void Formula::evaluateFormula(Name& name, int nameIndex, int level) {
evaluateFormula(targetName, targetNameIndex, level+1);

Operand res(oUNK);
if (!(targetName.m_macro || targetName.m_isBinary || targetName.m_hasError))
if (!targetName.m_stack.empty() && !(targetName.m_macro || targetName.m_isBinary || targetName.m_hasError))
res = targetName.m_stack[0];
res.m_rank = LEAF_RANK;

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
docparser (1.0.7) unstable; urgency=medium

* update to 1.0.7.

-- lvwujun <[email protected]> Tue, 05 Feb 2024 13:08:21 +0800

docparser (1.0.0) unstable; urgency=medium

* Initial Release.
Expand Down

0 comments on commit 2a5f600

Please sign in to comment.