1
0
Fork 0

Fix undefined behavior in new getAutoComment function

This commit is contained in:
Duncan Ogilvie 2022-01-05 13:00:33 +01:00
parent c66bf1689a
commit bd2638f662
1 changed files with 1 additions and 2 deletions

View File

@ -289,13 +289,12 @@ static bool getLabel(duint addr, char* label, bool noFuncOffset)
static bool getAutoComment(duint addr, String & comment)
{
bool retval;
bool retval = false;
duint disp;
char fileName[MAX_STRING_SIZE] = {};
int lineNumber = 0;
if(!bNoSourceLineAutoComments && SymGetSourceLine(addr, fileName, &lineNumber, &disp) && !disp)
{
char* actualName = fileName;
char* l = strrchr(fileName, '\\');
if(l)