Issue 121976 - Inconsistent use of STRING_NOTFOUND with indexOf
Summary: Inconsistent use of STRING_NOTFOUND with indexOf
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Minor (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2013-03-29 17:42 UTC by Pedro Giffuni
Modified: 2013-03-29 17:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Pedro Giffuni 2013-03-29 17:42:53 UTC
The issue was found in LibreOffice by Christina Rossmanith:

IndexOf doesn't return STRING_NOTFOUND as a value.
Opengroking the filter code it seems like

main/filter/source/msfilter/escherex.cxx : lines 1393 and 1604

is trying to compare against STRING_NOTFOUND after calling IndexOf.

Replacing STRING_NOTFOUND with (-1) would be more appropriate in this case.