Skip to content

Commit

Permalink
sclang/identDict_put: test if object is mutable before changing
Browse files Browse the repository at this point in the history
this fixes #1007
  • Loading branch information
Holger Ballweg committed Dec 26, 2013
1 parent 78f77ae commit 1e53975
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lang/LangPrimSource/PyrListPrim.cpp
Expand Up @@ -219,6 +219,7 @@ int identDictPut(struct VMGlobals *g, PyrObject *dict, PyrSlot *key, PyrSlot *va
}
}
array = slotRawObject(&dict->slots[ivxIdentDict_array]);
if (array->IsImmutable()) return errImmutableObject;
if (!isKindOf((PyrObject*)array, class_array)) return errFailed;

index = arrayAtIdentityHashInPairs(array, key);
Expand Down

0 comments on commit 1e53975

Please sign in to comment.