From: Eric Biggers Date: Sun, 29 Mar 2015 23:32:11 +0000 (-0500) Subject: win32_apply.c: simplify inode_longest_named_data_stream_spec() X-Git-Tag: v1.8.1~56 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=0efd94409732107bc4140364fc8fe76ef9236c1e win32_apply.c: simplify inode_longest_named_data_stream_spec() --- diff --git a/src/win32_apply.c b/src/win32_apply.c index a662cbf3..b326e182 100644 --- a/src/win32_apply.c +++ b/src/win32_apply.c @@ -634,12 +634,12 @@ inode_longest_named_data_stream_spec(const struct wim_inode *inode) const struct wim_inode_stream *strm = &inode->i_streams[i]; if (!stream_is_named_data_stream(strm)) continue; - size_t len = utf16le_len_bytes(strm->stream_name); + size_t len = utf16le_len_chars(strm->stream_name); if (len > max) max = len; } if (max) - max = 1 + (max / sizeof(wchar_t)); + max += 1; return max; }