DSPSymbols: fix off-by-one error
This commit is contained in:
parent
94f317010e
commit
d5c00b8909
|
@ -20,7 +20,6 @@ DSPSymbolDB g_dsp_symbol_db;
|
|||
|
||||
static std::map<u16, int> addr_to_line;
|
||||
static std::map<int, u16> line_to_addr;
|
||||
static std::map<int, const char*> line_to_symbol;
|
||||
static std::vector<std::string> lines;
|
||||
static int line_counter = 0;
|
||||
|
||||
|
@ -44,7 +43,7 @@ int Line2Addr(int line) // -1 for not found
|
|||
|
||||
const char* GetLineText(int line)
|
||||
{
|
||||
if (line > 0 && line < (int)lines.size())
|
||||
if (line >= 0 && line < (int)lines.size())
|
||||
{
|
||||
return lines[line].c_str();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue