Various spots left generated structures with uninit data, leaving to garbage placed in generated firmware.
Firmware(const u8* data, u32 length) ctor was susceptible to a buffer overflow or garbage being left in the buffer since FixFirmwareLength may change the resulting buffer size (although the input buffer size is still the same).
GetEffectiveUserData would use userdata 1 instead of 0 if the update counters were equal (which notably would be the case always with generated firmware). Firmware bootup and games would use userdata 0 however if they were equal. This lead to firmware override not working sometimes. Fixing this resolves #2057.
Firmware(const u8* data, u32 length)
ctor was susceptible to a buffer overflow or garbage being left in the buffer since FixFirmwareLength may change the resulting buffer size (although the input buffer size is still the same).