summaryrefslogtreecommitdiff
path: root/npc/functions/math.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/math.txt')
-rw-r--r--npc/functions/math.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/npc/functions/math.txt b/npc/functions/math.txt
index 3c2c935d9..ebb9ee069 100644
--- a/npc/functions/math.txt
+++ b/npc/functions/math.txt
@@ -46,6 +46,8 @@ function script log2 {
.@v=abs(getarg(0));
.@ok=0;
.@i=0;
+ if (.@v < 1)
+ return -1;
freeloop(true);
while (!.@ok) {