Apparently macOS is padding the name result with several padding zeroes at the end. Just strip them all to pretend it's a C-string. Thanks to Pavel for suggesting this fix.
Apparently macOS is padding the name result with several padding zeroes at the end. Just strip them all to pretend it's a C-string. Thanks to Pavel for suggesting this fix.