Closed Bios-Marcel closed 2 years ago
It is wrong, I agree. The buffer is reused but for Marshal it should make a copy before returning. The Writer.MustJSON suffers the same although I might take a different approach with that one and add an optional argument to either copy or not since in many case reuse of the buffer is not an issue. It certainly is with your use case.
I'll get the fix in tonight.
Fixed and released as v1.14.3.
Thanks for letting me know.
I'll just close this. I'll trust that you've fixed this ^^
I just evaluated the library for a new project, meaning I won't test it again for now.
Thanks. I did create a unit test for it and verified it failed before the fix and not after.
Look at the following. The results are clearly wrong. I am not sure if this is intended behaviour, but if so, it isn't documented.