Skip to content
Snippets Groups Projects
Commit f5f85475 authored by Nils-Arne Dreier's avatar Nils-Arne Dreier Committed by Siddhant Tibrewal
Browse files

fix: string termination

parent 08c253b1
No related branches found
No related tags found
No related merge requests found
......@@ -58,8 +58,9 @@ namespace coyote {
size_t hash = std::hash<std::string>{}(
iso_dt.value() + std::to_string(yac_time_reduction) + interpolation_stack_yaml);
char hash_str[2 * sizeof(hash)];
char hash_str[2 * sizeof(hash) + 1];
std::to_chars(hash_str, hash_str + (2 * sizeof(hash)), hash, 16);
hash_str[2 * sizeof(hash)] = 0;
std::string tgt_field_name = "target:" + source_field + "(" + hash_str + ")";
int target_field_id = -1;
yac_cdef_field(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment