diff options
author | Christian Hammacher <bmasterc@gmail.com> | 2021-09-05 21:44:15 +0300 |
---|---|---|
committer | Christian Hammacher <bmasterc@gmail.com> | 2021-09-05 21:44:15 +0300 |
commit | 16eac889476862aa272bccab2aadf0444d1ff467 (patch) | |
tree | 8480312513f10ceae43605f7a256896d95794448 /src/Platform | |
parent | 11423af6eb4866b0596ac751f4402324299a7cc5 (diff) |
Fixed bug causing invalid string parameters
Diffstat (limited to 'src/Platform')
-rw-r--r-- | src/Platform/Heap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Platform/Heap.cpp b/src/Platform/Heap.cpp index 5f34a6f6..aa61ff45 100644 --- a/src/Platform/Heap.cpp +++ b/src/Platform/Heap.cpp @@ -391,7 +391,7 @@ void StringHandle::InternalAssign(const char *s, size_t len) noexcept { IndexSlot * const slot = AllocateHandle(); StorageSpace * const space = AllocateSpace(len + 1); - SafeStrncpy(space->data, s, space->length); + SafeStrncpy(space->data, s, len + 1); slot->storage = space; slot->refCount = 1; slotPtr = slot; |