diff options
author | 2025-08-20 22:34:10 +0800 | |
---|---|---|
committer | 2025-09-27 01:49:33 +0200 | |
commit | 7355dc8e8344f00fae0e24db72e461d985eb6381 (patch) | |
tree | 604cc49a3db1ea0146b540638ba6b2a36656e24d /src | |
parent | 91ba4263dd795f83eaa9c43e52c3be55e4f382a6 (diff) | |
download | libplist-7355dc8e8344f00fae0e24db72e461d985eb6381.tar.gz libplist-7355dc8e8344f00fae0e24db72e461d985eb6381.tar.bz2 |
Updated the Integer(const PList::Integer&) constructor to free the existing plist node and copy the node from the input object, ensuring correct initialization.
Diffstat (limited to 'src')
-rw-r--r-- | src/Integer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Integer.cpp b/src/Integer.cpp index 30a5405..653455d 100644 --- a/src/Integer.cpp +++ b/src/Integer.cpp @@ -35,7 +35,8 @@ Integer::Integer(plist_t node, Node* parent) : Node(node, parent) Integer::Integer(const PList::Integer& i) : Node(PLIST_INT) { - plist_set_uint_val(_node, i.GetValue()); + plist_free(_node); + _node = plist_copy(i.GetPlist()); } Integer& Integer::operator=(const PList::Integer& i) |