- enhancement: Simplified chinese translations for encoding names.
- fix: Crash when there are preprocessing directives like '#if 0/0' or '#if 0%0'
This commit is contained in:
parent
48788a189b
commit
629a90d521
1
NEWS.md
1
NEWS.md
|
@ -18,6 +18,7 @@ Red Panda C++ Version 2.10
|
|||
- change: Project's encoding shouldn't be set to "auto detect"
|
||||
- fix: Can't correctly set project file's encoding back to 'UTF-8'/'ANSI' in the project options dialog/files setting page.
|
||||
- enhancement: Simplified chinese translations for encoding names.
|
||||
- fix: Crash when there are preprocessing directives like '#if 0/0' or '#if 0%0'
|
||||
|
||||
Red Panda C++ Version 2.9
|
||||
|
||||
|
|
|
@ -634,10 +634,10 @@ void Debugger::sendBreakpointCommand(PBreakpoint breakpoint)
|
|||
.arg(condition, filename)
|
||||
.arg(breakpoint->line));
|
||||
} else {
|
||||
// sendCommand("-break-insert",
|
||||
// QString("%1 --source \"%2\" --line %3")
|
||||
// .arg(condition,filename)
|
||||
// .arg(breakpoint->line));
|
||||
sendCommand("-break-insert",
|
||||
QString("%1 --source \"%2\" --line %3")
|
||||
.arg(condition,filename)
|
||||
.arg(breakpoint->line));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1441,12 +1441,18 @@ bool CppPreprocessor::evalMulExpr(const QString &expr, int &result, int &pos)
|
|||
pos++;
|
||||
if (!evalUnaryExpr(expr,rightResult,pos))
|
||||
return false;
|
||||
if (rightResult != 0)
|
||||
result /= rightResult;
|
||||
else
|
||||
result = 0;
|
||||
} else if (expr[pos]=='%') {
|
||||
pos++;
|
||||
if (!evalUnaryExpr(expr,rightResult,pos))
|
||||
return false;
|
||||
if (rightResult != 0)
|
||||
result %= rightResult;
|
||||
else
|
||||
result = 0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue