mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 23:29:44 -06:00
DSPSymbols: fix off-by-one error
This commit is contained in:
@ -20,7 +20,6 @@ DSPSymbolDB g_dsp_symbol_db;
|
|||||||
|
|
||||||
static std::map<u16, int> addr_to_line;
|
static std::map<u16, int> addr_to_line;
|
||||||
static std::map<int, u16> line_to_addr;
|
static std::map<int, u16> line_to_addr;
|
||||||
static std::map<int, const char*> line_to_symbol;
|
|
||||||
static std::vector<std::string> lines;
|
static std::vector<std::string> lines;
|
||||||
static int line_counter = 0;
|
static int line_counter = 0;
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ int Line2Addr(int line) // -1 for not found
|
|||||||
|
|
||||||
const char* GetLineText(int line)
|
const char* GetLineText(int line)
|
||||||
{
|
{
|
||||||
if (line > 0 && line < (int)lines.size())
|
if (line >= 0 && line < (int)lines.size())
|
||||||
{
|
{
|
||||||
return lines[line].c_str();
|
return lines[line].c_str();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user