ID:2449459
 
Resolved
jointext() behaved wrongly when given a start argument greater than 1 and a default end argument of 0.
BYOND Version:512
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 56.0
Applies to:Dream Daemon
Status: Resolved (512.1467)

This issue has been resolved.
Descriptive Problem Summary:
When you define a Start value >1 in jointext(List,Glue,Start=1,End=0) without also inputting a valid End value the proc will fail to return the proper value.


Sidenote: The documentation also talks about a nonexistant "include_delimiters" arg in the args section.


Numbered Steps to Reproduce Problem:
1. Make list with a few values (2 or more)
2. Add 3rd argument thats not 0 or 1 to jointext() using that list without a 4th arg defined

Code Snippet (if applicable) to Reproduce Problem:
var/list/L = list("A", "B","C")
world.log << "No end arg"
world.log << "jointext 1: [jointext(L,"-",1)]"
world.log << "jointext 2: [jointext(L,"-",2)]"

world.log << "End arg set"
world.log << "jointext 1: [jointext(L,"-",1, L.len+1)]"
world.log << "jointext 2: [jointext(L,"-",2, L.len+1)]"


Expected Results:
The default End arg of 0 should tell it to continue till the end of the list

Actual Results:
If you input a Start arg value >1, an End value of 0 causes you get "" back no matter the input list

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

When does the problem NOT occur?
When you input a valid 4th arg

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Did not test

Workarounds:
jointext(ListRef,"delimhere",startvalue,ListRef.len+1)
Lummox JR resolved issue with message:
jointext() behaved wrongly when given a start argument greater than 1 and a default end argument of 0.