ID:2546182
 
Resolved
Zero-width regular expression matches at the end of a string could cause splittext() to crash.
BYOND Version:513.1511
Operating System:Windows & Linux
Web Browser:Chrome 78.0.3904.99
Applies to:Dream Daemon
Status: Resolved (513.1512)

This issue has been resolved.
Descriptive Problem Summary:
DreamDaemon crashes when you run the code below. Very easy to reproduce.

Numbered Steps to Reproduce Problem:
Compile code below, run in DreamDaemon.

Code Snippet (if applicable) to Reproduce Problem:
world/New()
..()

var/teststr = "Guy1|Hello There\nGuy2|Hi person\nGuy3|What's up?"

var/list/decomposed = splittext(teststr,regex("\\||$","m"))

for(var/substr in decomposed)
world.log << decomposed


Expected Results:
Not crashing

Actual Results:
Instant crash

Does the problem occur:
Every time? Or how often? Every time
In other games? Not game-related
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
Doesn't crash in 512

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Appears to be new in 513

Workarounds:
Use 512
Lummox JR resolved issue with message:
Zero-width regular expression matches at the end of a string could cause splittext() to crash.