clugg / sm-json

A pure SourcePawn JSON encoder/decoder.
GNU General Public License v3.0
82 stars 8 forks source link

[Bug] Snapshots not deleted #22

Closed nickdnk closed 2 years ago

nickdnk commented 2 years ago

Hello

I'm fairly certain that a delete snap; call is missing for the Snapshots created here: https://github.com/clugg/sm-json/blob/9de367c42041b9f60a04e375ea24d2717d2a2827/addons/sourcemod/scripting/include/json.inc#L597 and here https://github.com/clugg/sm-json/blob/9de367c42041b9f60a04e375ea24d2717d2a2827/addons/sourcemod/scripting/include/json.inc#L730

It is being done here, so I'm assuming it's an oversight: https://github.com/clugg/sm-json/blob/9de367c42041b9f60a04e375ea24d2717d2a2827/addons/sourcemod/scripting/include/json.inc#L219-L221

I'm sorry if this is wrong, but according to the documentation a Snapshot must be manually deleted, and I don't see how this can possibly be happening with the current code.

Thanks for a nice project though.