diff options
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_math.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/funcs/func_math.c b/funcs/func_math.c index ab174d944..761c63228 100644 --- a/funcs/func_math.c +++ b/funcs/func_math.c @@ -289,7 +289,11 @@ static int math(struct ast_channel *chan, const char *cmd, char *parse, int inum1 = fnum1; int inum2 = fnum2; - ftmp = (inum1 % inum2); + if (inum2 == 0) { + ftmp = 0; + } else { + ftmp = (inum1 % inum2); + } break; } |