[Libreoffice-bugs] [Bug 143974] Basic function CStr is failing to properly convert integers after 41 steps in a for loop

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 28 17:34:55 UTC 2021


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

Andreas Heinisch <andreas.heinisch at yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikekaganski at hotmail.com

--- Comment #6 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
Consider this code where the index starts from 42:

Sub Main
Dim Txt As String
    For i = 42 To 50
        Txt = Txt + CStr(i)
        If (i mod 10 = 0) Then
            Txt = Txt + CHR(10)
        Else
            Txt = Txt + ", "
        End If
        Msgbox Typename(i)
    Next i
    MsgBox Txt
End Sub

The first time, the index is an Integer and after the increment it is a double,
hence this error. The fix of Bug 107953 made it visible, but I think the
culprit is https://gerrit.libreoffice.org/c/core/+/104696 (Bug 85371).

Codepointer:
https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=adb38e36#2641

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210928/42400a54/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list