diff options
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 33 |
1 files changed, 20 insertions, 13 deletions
@@ -436,23 +436,30 @@ static Stack *ToPostfix(const char *expr) } else { - /* Found an operand - parse and store the operand - */ - p=buff; - - while(*expr && !IS_OPERAND_END(*expr)) + if (!isspace(*expr)) { - *p++=*expr++; - } + /* Found an operand - parse and store the operand + */ + p=buff; - *p=0; + while(*expr && !IS_OPERAND_END(*expr)) + { + *p++=*expr++; + } - /* Note that operands are marked as unary just to chose one over - the other branch in EvalPostfix() - no other reason - */ - output=Push(output,TYPE_OPERAND,0,TRUE,buff); + *p=0; - prev_was_op=FALSE; + /* Note that operands are marked as unary just to chose one over + the other branch in EvalPostfix() - no other reason + */ + output=Push(output,TYPE_OPERAND,0,TRUE,buff); + + prev_was_op=FALSE; + } + else + { + expr++; + } } } |