Skip to content

Commit

Permalink
Correctint Windows compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmartin82 committed Feb 12, 2025
1 parent 873d62e commit aed8c9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/time_range.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static bool _z_time_range_parse_duration(const _z_str_se_t *bound, double *durat
return false;
}

char buf[len + 1];
char *buf = z_malloc(len + 1);
memcpy(buf, bound->start, len);
buf[len] = '\0';
char *err;
Expand All @@ -93,6 +93,7 @@ static bool _z_time_range_parse_duration(const _z_str_se_t *bound, double *durat
{
return false;
}
z_free(buf);
value *= multiplier;

// Check for overflow
Expand Down

0 comments on commit aed8c9f

Please sign in to comment.