From e5b75aef094310fa0efe2ad80b8c2bb3ddc8b5a2 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 21 Jun 2009 11:12:48 +0000 Subject: [PATCH] unbreak dsptool/dspspy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3521 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DSPCodeUtil.cpp | 2 +- Source/Core/DSPCore/Src/LabelMap.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp index 889bdc50d1..3f81b67e04 100644 --- a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp +++ b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp @@ -125,7 +125,7 @@ void CodeToHeader(const std::vector &code, std::string _filename, header.append("#define NUM_UCODES 1\n\n"); std::string filename; SplitPath(_filename, NULL, &filename, NULL); - header.append("const char* UCODE_NAMES[NUM_UCODES] = {\"%s\"};\n\n", filename.c_str()); + header.append(StringFromFormat("const char* UCODE_NAMES[NUM_UCODES] = {\"%s\"};\n\n", filename.c_str())); header.append("#ifndef _MSCVER\n"); header.append("const unsigned short dsp_code[NUM_UCODES][0x1000] = {\n"); header.append("#else\n"); diff --git a/Source/Core/DSPCore/Src/LabelMap.cpp b/Source/Core/DSPCore/Src/LabelMap.cpp index abedeb6860..6d3a475857 100644 --- a/Source/Core/DSPCore/Src/LabelMap.cpp +++ b/Source/Core/DSPCore/Src/LabelMap.cpp @@ -27,11 +27,13 @@ void LabelMap::RegisterDefaults() { for (int i = 0; i < 0x24; i++) { - RegisterLabel(regnames[i].name, regnames[i].addr); + if (regnames[i].name) + RegisterLabel(regnames[i].name, regnames[i].addr); } for (int i = 0; i < (int)pdlabels_size; i++) { - RegisterLabel(pdlabels[i].name, pdlabels[i].addr); + if (pdlabels[i].name) + RegisterLabel(pdlabels[i].name, pdlabels[i].addr); } }