https://bugs.documentfoundation.org/show_bug.cgi?id=118442

            Bug ID: 118442
           Summary: BASIC: Converting a negative number string with
                    decimals to double asserts in debug builds
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: mikekagan...@hotmail.com

Running the BASIC code

> Sub Test
>   Dim f As Double
>   f = " -12.20"
> End Sub

brings assert in debug builds:

> ---------------------------
> Microsoft Visual C++ Runtime Library
> ---------------------------
> Assertion failed!
> 
> Program: C:\lo\core\instdir\program\sblo.dll
> File: C:\lo\core\include\rtl/ustrbuf.hxx
> Line: 490
> 
> Expression: index >= 0 && index < pData->length

The problem is that the number string is prepended with spaces and/or minus
sign, which is not accounted for in ImpScan in basic/source/sbx/sbxscan.cxx.

https://gerrit.libreoffice.org/56611 fixes this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to