Skip to content

Commit

Permalink
Fixed compat build
Browse files Browse the repository at this point in the history
  • Loading branch information
darkshade9 committed Feb 2, 2024
1 parent 53bc001 commit b9c207f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/g_libcurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ void lc_start_request_function(request_t* request)

void process_stats(json_t *stats_json)
{
int i;
if (!json_is_object(stats_json)) {
gi.dprintf("error: stats is not a JSON object\n");
return;
Expand All @@ -309,7 +310,7 @@ void process_stats(json_t *stats_json)
int num_stats = sizeof(stat_names) / sizeof(stat_names[0]);

lt_stats_t stats;
for (int i = 0; i < num_stats; i++) {
for (i = 0; i < num_stats; i++) {
json_t *stat_json = json_object_get(stats_json, stat_names[i]);
if (!stat_json) {
gi.dprintf("error: %s is missing\n", stat_names[i]);
Expand Down
3 changes: 2 additions & 1 deletion source/tng_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,13 @@ else return NULL
edict_t *find_player_by_steamid(const char* steamid)
{
edict_t *ent;
int i;

// Don't do anything if steamid is null/emtpy/zero
if (steamid == NULL || steamid[0] == '\0' || strcmp(steamid, "0") == 0)
return NULL;

for (int i = 0; i < game.maxclients; i++)
for (i = 0; i < game.maxclients; i++)
{
ent = &g_edicts[1 + i];
if( !ent->inuse || !ent->client || ent->is_bot)
Expand Down

0 comments on commit b9c207f

Please sign in to comment.