Skip to content

Commit

Permalink
Fix pointer magic going wrong
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Jan 20, 2024
1 parent bafbc78 commit 619a8b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,12 +1016,12 @@ bool compile_filter_regex(struct ftl_conn *api, const char *path, cJSON *json, r
}

// Compile regex
int rc = regcomp(regex[i], filter->valuestring, REG_EXTENDED);
int rc = regcomp(&(*regex)[i], filter->valuestring, REG_EXTENDED);
if(rc != 0)
{
// Failed to compile regex
char errbuf[1024] = { 0 };
regerror(rc, regex[i], errbuf, sizeof(errbuf));
regerror(rc, &(*regex)[i], errbuf, sizeof(errbuf));
log_err("Failed to compile regex \"%s\": %s",
filter->valuestring, errbuf);
return send_json_error(api, 400,
Expand Down

0 comments on commit 619a8b1

Please sign in to comment.