ID:2959401
 
Resolved
When for(k,v in list) had a non-associative list, it incorrectly acted as though the list was empty.
BYOND Version:516.1648
Operating System:Windows 11 Home 64-bit
Web Browser:Chrome 131.0.0.0
Applies to:Dream Daemon
Status: Resolved (516.1649)

This issue has been resolved.
Descriptive Problem Summary:
for(k, v in list) does not run when the list supplied has no associative values.

According to the ref, v should be null if supplied a non-associative list.

Code Snippet (if applicable) to Reproduce Problem:
var/list/l = list("hi", "there")
world.log << "No vals:"
for(var/k, v in l)
world.log << "[k] : [v]"
world.log << "\nVals:"
l["hi"] = 1
for(var/k, v in l)
world.log << "[k] : [v]"


Expected Results:

No vals:
hi :
there :

Vals:
hi : 1
there :

Actual Results:

No vals:

Vals:
hi : 1
there :


Lummox JR resolved issue with message:
When for(k,v in list) had a non-associative list, it incorrectly acted as though the list was empty.

Login to reply.