diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-06-29 02:54:52 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-06-29 07:43:52 +0200 |
commit | b24b0b9856b42eb6598c053703a11f86b6a6346c (patch) | |
tree | d3e87eb6d172501335a4112bf1e3fa313b80b6fd /sw | |
parent | 1cedd88d40a26a55ce433f8b742215aea83a5382 (diff) |
tdf#118442: Fix incorrect index calculation
If a number string has leading spaces and/or minus, then calculating
index into the aBuf as the difference between p and pStart gives
wrong (too big) number. This asserts in debug builds, when e.g. an
assignment is made in a BASIC macro:
Dim f As Double
f = " -12.20"
"include/rtl/ustrbuf.hxx:490:
sal_Unicode &rtl::OUStringBuffer::operator[](sal_Int32):
Assertion `index >= 0 && index < pData->length' failed."
This affects, e.g., https://gerrit.libreoffice.org/56610 (see
https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/9527/consoleFull#1820989527d893063f-7f3d-4b7e-b56f-4e0f225817cd)
Change-Id: I14654166be721907e2a26ea6f4091f203a9437d7
Reviewed-on: https://gerrit.libreoffice.org/56611
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
0 files changed, 0 insertions, 0 deletions