git: gpt(8): Fix bugs in utf8_to_utf16()
Aaron LI
aly at crater.dragonflybsd.org
Wed Feb 18 06:32:41 PST 2026
commit 8f0151c149f68a7c9cf9d24787a57a2d63688318
Author: Aaron LI <aly at aaronly.me>
Date: Wed Jan 21 14:02:54 2026 +0800
gpt(8): Fix bugs in utf8_to_utf16()
- The 'utfchar' was incorrectly reinitialized to zero on every loop
iteration and thus destroyed the decoding state of multi-byte UTF-8
sequences. Fix it.
- Fix the endianness by adding the missing htole16() calls.
Obtained-from: NetBSD
Summary of changes:
sbin/gpt/gpt.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8f0151c149f68a7c9cf9d24787a57a2d63688318
--
DragonFly BSD source repository
More information about the Commits
mailing list