]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
encoding.c: Upgrade upcase table and rewrite decompression code
[wimlib] / src / win32_apply.c
index a662cbf33ea94d0f306cd1bf84f8e4c8d883b313..ffcd3a1fc7a4c675216194b1ab5c270963cdf184 100644 (file)
@@ -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;
 }
 
@@ -2465,11 +2465,11 @@ do_warnings(const struct win32_apply_ctx *ctx)
        }
 }
 
-static uint64_t
+static u64
 count_dentries(const struct list_head *dentry_list)
 {
        const struct list_head *cur;
-       uint64_t count = 0;
+       u64 count = 0;
 
        list_for_each(cur, dentry_list)
                count++;
@@ -2483,7 +2483,7 @@ win32_extract(struct list_head *dentry_list, struct apply_ctx *_ctx)
 {
        int ret;
        struct win32_apply_ctx *ctx = (struct win32_apply_ctx *)_ctx;
-       uint64_t dentry_count;
+       u64 dentry_count;
 
        ret = prepare_target(dentry_list, ctx);
        if (ret)