Skip to content

Commit

Permalink
Fix bogus sizeof on ArrayList
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikusch committed Jun 5, 2024
1 parent d5a61e4 commit 5762a2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/friendlyfire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <tf2_stocks>
#include <tf2utils>

#define PLUGIN_VERSION "1.2.6"
#define PLUGIN_VERSION "1.2.7"

#define TICK_NEVER_THINK -1.0
#define TF_CUSTOM_NONE 0
Expand Down
6 changes: 4 additions & 2 deletions addons/sourcemod/scripting/friendlyfire/entity.sp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ methodmap Entity
{
this.CheckArrayBounds(index);

for (int i = 0; i < sizeof(g_entityProperties); i++)
int length = g_entityProperties.Length;
for (int i = 0; i < length; i++)
{
EntityProperties properties;
if (g_entityProperties.GetArray(this.ListIndex, properties))
Expand All @@ -175,7 +176,8 @@ methodmap Entity

int listIndex = this.ListIndex;

for (int i = 0; i < sizeof(g_entityProperties); i++)
int length = g_entityProperties.Length;
for (int i = 0; i < length; i++)
{
EntityProperties properties;
if (g_entityProperties.GetArray(listIndex, properties))
Expand Down

0 comments on commit 5762a2e

Please sign in to comment.