Bug (patch included) Item.seller, Item.buyer throws error in JavaScript

  • KoLmafia version: r20608
Steps to reproduce
Run js Item.get('wicker shield').seller in the gCLI.

Expected result
Same value as running js Coinmaster.get('Dimemaster')

Actual result
> js Item.get('wicker shield').seller

Script exception: ASH function returned native Java object.
Returned: null

This is caused by two methods in ProxyRecordValue.java that return an unwrapped CoinmasterData object. It can be trivially fixed by wrapping the object as a Value.

I'm submitting a patch that fixes this. I also did a cursory scan through ProxyRecordValue.java, but these appear to be the only instances where a non-static method returns an unwrapped Java object.


  • philmasterplus-js-seller-buyer-fix.patch
    1.2 KB · Views: 0