- 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"
|
- 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.
|
- 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.
|
- 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
|
Red Panda C++ Version 2.9
|
||||||
|
|
||||||
|
|
|
@ -634,10 +634,10 @@ void Debugger::sendBreakpointCommand(PBreakpoint breakpoint)
|
||||||
.arg(condition, filename)
|
.arg(condition, filename)
|
||||||
.arg(breakpoint->line));
|
.arg(breakpoint->line));
|
||||||
} else {
|
} else {
|
||||||
// sendCommand("-break-insert",
|
sendCommand("-break-insert",
|
||||||
// QString("%1 --source \"%2\" --line %3")
|
QString("%1 --source \"%2\" --line %3")
|
||||||
// .arg(condition,filename)
|
.arg(condition,filename)
|
||||||
// .arg(breakpoint->line));
|
.arg(breakpoint->line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1441,12 +1441,18 @@ bool CppPreprocessor::evalMulExpr(const QString &expr, int &result, int &pos)
|
||||||
pos++;
|
pos++;
|
||||||
if (!evalUnaryExpr(expr,rightResult,pos))
|
if (!evalUnaryExpr(expr,rightResult,pos))
|
||||||
return false;
|
return false;
|
||||||
|
if (rightResult != 0)
|
||||||
result /= rightResult;
|
result /= rightResult;
|
||||||
|
else
|
||||||
|
result = 0;
|
||||||
} else if (expr[pos]=='%') {
|
} else if (expr[pos]=='%') {
|
||||||
pos++;
|
pos++;
|
||||||
if (!evalUnaryExpr(expr,rightResult,pos))
|
if (!evalUnaryExpr(expr,rightResult,pos))
|
||||||
return false;
|
return false;
|
||||||
|
if (rightResult != 0)
|
||||||
result %= rightResult;
|
result %= rightResult;
|
||||||
|
else
|
||||||
|
result = 0;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue