mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-23 00:30:17 +00:00
Debugger: Symbol loading: Fix random crash upon start up. (PR #694)
This commit is contained in:
parent
bd730e25c0
commit
cb007df40b
@ -622,10 +622,13 @@ int ParseSymbolTable(const std::string & pPathFileName, SymbolTable_Index_e eSym
|
||||
p = strstr(szLine, ";"); // Optional
|
||||
if(p) *p = 0;
|
||||
p = strstr(szLine, " "); // 1st space between name & value
|
||||
if (p)
|
||||
{
|
||||
int nLen = p - szLine;
|
||||
if (nLen > MAX_SYMBOLS_LEN)
|
||||
{
|
||||
memset(&szLine[MAX_SYMBOLS_LEN], ' ', nLen-MAX_SYMBOLS_LEN); // sscanf fails for nAddress if string too long
|
||||
memset(&szLine[MAX_SYMBOLS_LEN], ' ', nLen - MAX_SYMBOLS_LEN); // sscanf fails for nAddress if string too long
|
||||
}
|
||||
}
|
||||
sscanf(szLine, sFormat2, sName, &nAddress);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user