mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 08:22:28 +00:00
Immediately load 0-length sfx lumps as nullopt
This commit is contained in:
parent
98ba6c0590
commit
c5db728606
1 changed files with 7 additions and 2 deletions
|
|
@ -214,7 +214,12 @@ optional<SoundChunk> try_load_gme(tcb::span<std::byte> data)
|
|||
|
||||
optional<SoundChunk> srb2::audio::try_load_chunk(tcb::span<std::byte> data)
|
||||
{
|
||||
optional<SoundChunk> ret;
|
||||
optional<SoundChunk> ret = nullopt;
|
||||
|
||||
if (data.size() == 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = try_load_dmx(data);
|
||||
if (ret)
|
||||
|
|
@ -232,5 +237,5 @@ optional<SoundChunk> srb2::audio::try_load_chunk(tcb::span<std::byte> data)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
return nullopt;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue