mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-02 15:02:11 +00:00
Avoid calling std::vector::data() if empty
This commit is contained in:
parent
b83e39a540
commit
0791349455
@ -4427,6 +4427,8 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
|
||||
SPUDisAsm dis_asm(cpu_disasm_mode::dump, reinterpret_cast<const u8*>(result.data.data()), result.lower_bound);
|
||||
|
||||
std::string hash;
|
||||
|
||||
if (!result.data.empty())
|
||||
{
|
||||
sha1_context ctx;
|
||||
u8 output[20];
|
||||
@ -4436,6 +4438,10 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
|
||||
sha1_finish(&ctx, output);
|
||||
fmt::append(hash, "%s", fmt::base57(output));
|
||||
}
|
||||
else
|
||||
{
|
||||
hash = "N/A";
|
||||
}
|
||||
|
||||
fmt::append(out, "========== SPU BLOCK 0x%05x (size %u, %s) ==========\n\n", result.entry_point, result.data.size(), hash);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user