diff options
author | Erik Larsson <catacombae@gmail.com> | 2021-03-07 14:46:59 +0000 |
---|---|---|
committer | Erik Larsson <catacombae@gmail.com> | 2021-03-07 14:46:59 +0000 |
commit | 86dd5fea351a5a55bea26b7622eb85ebd6075a60 (patch) | |
tree | 6de3fe6c2668b36e6c642e8a5590ceebc15b0f83 /gptpart.cc | |
parent | f063fe08e424c99f133df18bf9dce49c851bcb0a (diff) | |
download | sgdisk-86dd5fea351a5a55bea26b7622eb85ebd6075a60.tar.gz |
gptpart.cc: Fix double byteswap for big-endian architectures.
The data in 'name' was already byteswapped by ReversePartBytes, so
byteswapping it again in GetDescription returned each UTF-16BE unit back
to UTF-16LE and caused seemingly garbage strings to be printed.
Diffstat (limited to 'gptpart.cc')
-rw-r--r-- | gptpart.cc | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -92,7 +92,6 @@ string GPTPart::GetDescription(void) { size_t pos = 0 ; while ( ( pos < NAME_SIZE ) && ( name[ pos ] != 0 ) ) { uint16_t cp = name[ pos ++ ] ; - if ( ! IsLittleEndian() ) ReverseBytes( & cp , 2 ) ; // first to utf32 uint32_t uni ; if ( cp < 0xd800 || cp > 0xdfff ) { |