Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed incorrect sref name used for tables within table keys
`insref` argument of `val2str` explicitly sets name to use for a value within the self reference section when it is seen again. It's necessary to provide it for table keys, as they can only be referenced through the `iname` storage table. For values sref name can be calculated based on sref of the parent table and the key. When serializing normal values (key is not a table or another special type), `insref` was passed as is to the recursive `val2str` call. This is incorrect when `insref` is actually present (i.e. parent table is a table key or a value for a table key), the values should get their own sref names instead of the parent name. Passing `nil` instead is enough to fix this. Fixes #28, closes #30.
- Loading branch information