https://bugs.documentfoundation.org/show_bug.cgi?id=131241
Bug ID: 131241
Summary: Hex value gives negative long / single / double number
Product: LibreOffice
Version: 6.4.1.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
A hex value assigned to a long variable gives a negative number, instead of a
correct number.
LO 6.1.5 debian: aLong = &HFFE0
(aLong = 65,504)
LO 6.4.1 manjaro: aLong = &HFFE0
(aLong = -32)
Steps to Reproduce:
Just run this and get an overflow error
Sub aLetterExample
Dim aLetter As Long
aLetter = &HFFE0
msgbox chr(aLetter)
End Sub
This would work on both versions
Sub aLetterExampleFix
Dim aLetter As Long
aLetter = CLng("&HFFE0")
msgbox chr(aLetter)
End Sub
Actual Results:
-32
Expected Results:
65504
Reproducible: Always
User Profile Reset: No
Additional Info:
assign 65504 tp variable
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs