https://bugs.documentfoundation.org/show_bug.cgi?id=160770
Bug ID: 160770
Summary: Crashes on second access of regex matches without VBA
support option
Product: LibreOffice
Version: 7.6.6.3 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
VB macro using RegEx matches.
Calc crashes on second access of regex matches without VBA support option
Steps to Reproduce:
1.Run the attached macro
2.
3.
Actual Results:
Calc application crashes
Expected Results:
Work properly
Reproducible: Always
User Profile Reset: No
Additional Info:
REM ***** BASIC *****
' Crashes on second access of regex matches (line 19) without VBA support
option.
Private Function RegEx_Matches_Calc_Crash()
Dim regEx As Object
Set regEx = CreateObject("VBScript.RegExp")
regEx.Global = True
regEx.IgnoreCase = True
html = "<span>10:35 AM EDT</span>"
regEx.Pattern = "<span>([0-9]{2}):([0-9]{2}) (AM|PM) (EST|EDT)</span>"
Set Matches = regEx.Execute(html)
If Matches.Count > 0 Then
TimeHour = Matches.Item(0).SubMatches.Item(0)
TimeHour = Matches.Item(0).SubMatches.Item(0)
TimeMinute = Matches.Item(0).SubMatches.Item(1)
TimeAMPM = Matches.Item(0).SubMatches.Item(2)
TimeTZ = Matches.Item(0).SubMatches.Item(3)
End If
End Function
' Version: 7.6.6.3 (X86_64) / LibreOffice Community
' Build ID: d97b2716a9a4a2ce1391dee1765565ea469b0ae7
' CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL:
win
' Locale: en-US (en_US); UI: en-US
' Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.