mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[calculation] When the output text overflowed the buffer, parsing the
text returns nullptr. Handle this case here
This commit is contained in:
committed by
LeaNumworks
parent
217d0ccc10
commit
52065c26ed
@@ -149,6 +149,9 @@ Expression * Calculation::exactOutput(Context * context) {
|
||||
* 'sqrt(2)/2 = 0.999906' (which is totally wrong) instead of
|
||||
* 'cos(pi/4) = 0.999906' (which is true in degree). */
|
||||
m_exactOutput = Expression::parse(m_exactOutputText);
|
||||
if (m_exactOutput == nullptr) {
|
||||
m_exactOutput = new Undefined();
|
||||
}
|
||||
}
|
||||
return m_exactOutput;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user