win32_apply.c: Use sizeof(wchar_t)
authorEric Biggers <ebiggers3@gmail.com>
Thu, 22 May 2014 16:52:58 +0000 (11:52 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 22 May 2014 16:53:05 +0000 (11:53 -0500)
src/win32_apply.c

index f741b44..2926883 100644 (file)
@@ -482,7 +482,7 @@ build_win32_extraction_path(const struct wim_dentry *dentry,
        ctx->pathbuf.Length += ctx->target_ntpath.Length + sizeof(wchar_t);
        ctx->pathbuf.Buffer[ctx->pathbuf.Length / sizeof(wchar_t)] = L'\0';
 
-       wimlib_assert(ctx->pathbuf.Length >= 8 &&
+       wimlib_assert(ctx->pathbuf.Length >= 4 * sizeof(wchar_t) &&
                      !wmemcmp(ctx->pathbuf.Buffer, L"\\??\\", 4));
 
        ctx->pathbuf.Buffer[1] = L'\\';