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); } }