Skip to content

Commit

Permalink
Fix Windows crash on particle tree traversal
Browse files Browse the repository at this point in the history
Closes #19.
  • Loading branch information
nosoop committed Jan 30, 2023
1 parent d067ff3 commit 456af81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripting/tf_econ_data.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stocksoup/handles>
#include <stocksoup/memory>

#define PLUGIN_VERSION "0.18.2"
#define PLUGIN_VERSION "0.18.3"
public Plugin myinfo = {
name = "[TF2] Econ Data",
author = "nosoop",
Expand Down
2 changes: 1 addition & 1 deletion scripting/tf_econ_data/attached_particle_systems.sp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int GetParticleSystemTreeElement(int index, TreeElement elem) {

static bool IsParticleSystemRightChild(int index) {
int parent = GetParticleSystemTreeElement(index, Tree_Parent);
return GetParticleSystemTreeElement(parent, Tree_RightChild) == index;
return parent != 0xFFFF && GetParticleSystemTreeElement(parent, Tree_RightChild) == index;
}

// get address of attachedparticlesystem_t in CUtlRBTree by index
Expand Down

0 comments on commit 456af81

Please sign in to comment.