diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-21 16:24:39 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-05-21 16:24:39 -0400 |
| commit | 4b1615c76b5b4fe110eb01392c98eddaf03bb103 (patch) | |
| tree | 2f6be10fe3bca7f630a503c2a4618244cef932fd /src | |
| parent | 73595d127a0cfc9b36e8e9489fdcbd35de051c38 (diff) | |
pke: component serialization alloc string via val
Diffstat (limited to 'src')
| -rw-r--r-- | src/serialization-component.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/serialization-component.cpp b/src/serialization-component.cpp index 4f65a5a..63e7a5c 100644 --- a/src/serialization-component.cpp +++ b/src/serialization-component.cpp @@ -163,7 +163,8 @@ pk_handle pke_serialize_instance(srlztn_serialize_helper *h, const CompInstance } if (et != nullptr) { kve.key = SRLZTN_INSTANCE_COMPONENT_ENTITY_TYPE_CODE; - s = pk_new<char>(et->entityTypeCode.reserved, h->bkt); + len = strlen(et->entityTypeCode.val); + s = pk_new<char>(len+1, h->bkt); sprintf(s, "%s", et->entityTypeCode.val); kve.val = s; kve.end = SRLZTN_KVE_END; |
