DSPSymbols: fix off-by-one error

This commit is contained in:
Tillmann Karras 2020-06-08 03:33:31 +01:00
parent 94f317010e
commit d5c00b8909
1 changed files with 1 additions and 2 deletions

View File

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