mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
fix power nil pointer
This commit is contained in:
@@ -568,6 +568,9 @@ func calcPower(o operationType, stack stack) (number, ArErr) {
|
|||||||
n1, _ := output.Float64()
|
n1, _ := output.Float64()
|
||||||
n2, _ := resp.(number).Float64()
|
n2, _ := resp.(number).Float64()
|
||||||
output = newNumber().SetFloat64(math.Pow(n1, n2))
|
output = newNumber().SetFloat64(math.Pow(n1, n2))
|
||||||
|
if output == nil {
|
||||||
|
output = infinity
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return nil, ArErr{
|
return nil, ArErr{
|
||||||
"Runtime Error",
|
"Runtime Error",
|
||||||
|
|||||||
Reference in New Issue
Block a user