diff options
Diffstat (limited to 'node/scalaroperatornode.cpp')
| -rw-r--r-- | node/scalaroperatornode.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/node/scalaroperatornode.cpp b/node/scalaroperatornode.cpp index 34eb6b8..8dfbc20 100644 --- a/node/scalaroperatornode.cpp +++ b/node/scalaroperatornode.cpp @@ -105,6 +105,11 @@ qint64 ScalarOperatorNode::substract(qint64 a,qint64 b) qreal ScalarOperatorNode::divide(qint64 a,qint64 b) { + if(b==0) + { + m_errors.append(DIVIDE_BY_ZERO); + return 0; + } return (qreal)a/b; } |