soopercool101 / BrawlCrate

BrawlBox/BrawlTools Fork, Wii File Editor
https://discord.gg/s7c8763
GNU Lesser General Public License v3.0
144 stars 38 forks source link

[U8Node] Fix saving next U8 Folder index #67

Closed Gabriela-Orzechowska closed 1 year ago

Gabriela-Orzechowska commented 1 year ago

Currently the tool saves 0x08 of folder entry of U8 archive as index of last entry of the folder, although it is supposed to be index of first node that is not a part of the folder. This results in incorrect folder structure being saved, where folders are one inside of another. This fixes this issue. It's not perfect, but gets the job done correctly.

soopercool101 commented 1 year ago

Do you have a test case file or reproducible way to create the bug fixed by this commit in current Canary? Everything I have on my end appeared to be fixed by #64

Gabriela-Orzechowska commented 1 year ago

This is the file I was testing with koopa_course.zip

64 fixed the issue, but only when root folder ./ is present. Here for example, that's not the case.

soopercool101 commented 1 year ago

Correctly appears to fix corruption of brasd, effect, and posteffect paths. Thank you for the PR!