]> wimlib.net Git - wimlib/blobdiff - src/resource.c
Align security data correctly
[wimlib] / src / resource.c
index 0c7a4cf9b40f3a929ec459188e7239fc96051604..0e55725d921e07679a0ef88bc37c3e6038a7976e 100644 (file)
@@ -1256,7 +1256,8 @@ int write_metadata_resource(WIMStruct *w)
         * - plus 8 bytes for an end-of-directory entry following the root
         *   dentry (shouldn't really be needed, but just in case...)
         */
-       subdir_offset = ((sd->total_length + 7) & ~7) + dentry_total_length(root) + 8;
+       subdir_offset = ((sd->total_length + 7) & ~7) +
+                       dentry_correct_total_length(root) + 8;
 
        /* Calculate the subdirectory offsets for the entire dentry tree. */
        calculate_subdir_offsets(root, &subdir_offset);