Summary:ASTERISK-09230: MATH cannot be used with first parameter negative
Reporter:Marcel Barbulescu (marcelbarbulescu)Labels:
Date Opened:2007-04-09 12:11:49Date Closed:2007-05-24 10:24:26
Versions:Frequency of
Environment:Attachments:( 0) func_math-negativenum.diff
Description:${MATH(-5-3)} throws:

func_math.c:163 math: '' is not a valid number
Comments:By: Jason Parker (jparker) 2007-04-09 13:18:58

Patch uploaded.  It's somewhat of a hack, but short of rewriting the entire function, it's not really possible without some form of hack.

By: Marcel Barbulescu (marcelbarbulescu) 2007-04-09 23:45:06

It looks good, it should also solve the "1*-1" problem.

Just want to double check one thing: is mvalue1 supposed to be trimmed of white spaces on the left side when it reaches your code?

By: Marcel Barbulescu (marcelbarbulescu) 2007-04-18 18:02:36

It's definitely better with the patch than without so if no further work is done it can probably be committed as is.

By: Dwayne Hubbard (dhubbard) 2007-04-19 10:08:30

 you don't have a disclaimer on file.  Can you send one in?

By: Marcel Barbulescu (marcelbarbulescu) 2007-04-19 10:14:22

The patch is not mine, is qwell's. However, I sent a disclaimer about 2 weeks ago by mail. You want me to fax it also?

By: Dwayne Hubbard (dhubbard) 2007-04-19 10:22:50

marcelbarbulescu: thx for pointing that out.  :-P

By: Dwayne Hubbard (dhubbard) 2007-05-24 10:24:25

fixed in revision 65866