mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Avoid calling std::vector::data() if empty
This commit is contained in:
parent
b83e39a540
commit
0791349455
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue