From 43d5efc01609bdbc029fb1aa992e6cafaf60030f Mon Sep 17 00:00:00 2001 From: Marc Worrell Date: Fri, 26 Apr 2024 12:18:31 +0200 Subject: [PATCH] Also match on -0.0 --- src/template_compiler_operators.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/template_compiler_operators.erl b/src/template_compiler_operators.erl index f971933..eaf7111 100644 --- a/src/template_compiler_operators.erl +++ b/src/template_compiler_operators.erl @@ -129,6 +129,7 @@ divide(A, B, Runtime, Context) -> {_, undefined} -> undefined; {_, 0} -> undefined; {_, +0.0} -> undefined; + {_, -0.0} -> undefined; {A1, B1} -> A1 / B1 end. @@ -145,6 +146,7 @@ modulo(A, B, Runtime, Context) -> {_, undefined} -> undefined; {_, 0} -> undefined; {_, +0.0} -> undefined; + {_, -0.0} -> undefined; {A1, B1} -> A1 rem B1 end.