Skip to content

v1.0.2

Compare
Choose a tag to compare
@UInt2048 UInt2048 released this 24 Nov 13:50
7f697b3
Fix crash when converting size string to UInt64 (#1)

For some tar files, `sizeString` returns a string with a whitespace at the end. 
`UInt64(sizeString, radix: 8)` would then return `nil`, and unwrapping the optional with `!` would lead to a crash.

Unlike the `UInt64` constructor, `strtoull` properly handles the string with whitespace at the end.

Another option would be to trim the whitespaces at the end of `sizeString` but it seemed safer
to avoid manipulating that string.