Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/Tests/Builtins/params2list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
ASSERT(json_encode(params2list("a;a;a")) == @#{"a":["","",""]}#)

ASSERT(params2list("a=1;b=2") ~= list(a="1", b="2"))
ASSERT(params2list("a=1;a=2") ~= list(a="2"))
ASSERT(params2list("a=1;a=2")["a"] ~= list("1","2"))
7 changes: 4 additions & 3 deletions OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1886,9 +1886,10 @@ public static DreamList Params2List(DreamObjectTree objectTree, string queryStri
}
}
} else {
string queryValue = queryValues[^1]; //Use the last appearance of the key in the query

list.SetValue(new DreamValue(queryKey), new DreamValue(queryValue));
if (queryValues.Length > 1)
list.SetValue(new DreamValue(queryKey), new DreamValue(objectTree.CreateList(queryValues)));
else
list.SetValue(new DreamValue(queryKey), new DreamValue(queryValues[0]));
}
}

Expand Down
Loading