lisdude/toaststunt

Server panic when setting nested value in a property with a waif's :_set_index

Opened this issue · 0 comments

The server panics when trying to use _index and _set_index to store a nested value in a waif stored in a property. Interestingly, it seems to work properly for variables, or at least if not properly it doesn't crash.
Put differently: if you store a waif in a property that has these two verbs, and you try to add a key to any submap of that waif, server panic.
Here's an example object, using $waif as its parent; call crash() on it to reproduce the bug:

@create $waif named Crash The Server Waif
@prop #710.":data" [] rc
@prop #710."crash" 0
@verb #710:":_index" this none this
@program #710::_index
return this.data[args[1]];
.

@verb #710:":_set_index" this none this
@program #710::_set_index
this.data[args[1]] = args[2];
return this;
.

@verb #710:"crash" this none this
@program #710:crash
w = this:new();
this.crash = w;
this.crash["data"] = "something";
"Good so far.";
this.crash["submap"] = [];
"Even here. But then...";
this.crash["submap"]["anything"] = 1;
"panic";
.