forked from stellar/go-xdr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix decoding nil pointer to the previously used object (stellar#13)
This commit fixes a bug in `Decoder.decodePtr`. When decoding a struct with a pointer field into previously used object (ex. in a loop with object created outside of the loop) the previous non-`nil` pointer value was not overwritten if the new value was `nil`. See `TestDecodeNilPointerIntoExistingObjectWithNotNilPointer` for more context.
- Loading branch information
Showing
2 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters