libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
532 stars 304 forks source link

Fixed bug in array_fill #194

Closed liujianfengv closed 3 years ago

liujianfengv commented 3 years ago

Bug: when creating a new Array object (for example through PList::Node::FromPlist(plist_t node) ), the array_fill function is called from Array() constructor in line 51. It seems that the intended way of calling array_fill() is to pass the _array object by reference, however it is actually passed by value. Thus the changes to the array object made by array_fill() are discarded when the function returns. Fix: pass _array by reference to keep the changes

liujianfengv commented 3 years ago

@nikias Hello, is there anything specific that needs to be done in this PR for you to be able to accept it? Thanks!

nikias commented 3 years ago

Hi, I merged it after a rebase. Thanks for reporting.