mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
fix a bug in copy constructor of ParsedJson::iterator. (#146)
This commit is contained in:
@@ -34,7 +34,7 @@ ParsedJson::iterator::iterator(const iterator &o):
|
||||
current_val(o.current_val), depthindex(nullptr) {
|
||||
depthindex = new scopeindex_t[pj.depthcapacity];
|
||||
if(depthindex != nullptr) {
|
||||
memcpy(o.depthindex, depthindex, pj.depthcapacity * sizeof(depthindex[0]));
|
||||
memcpy(depthindex, o.depthindex, pj.depthcapacity * sizeof(depthindex[0]));
|
||||
} else {
|
||||
tape_length = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user