From: Heng Li Date: Fri, 22 May 2015 01:54:10 +0000 (-0400) Subject: fixed a bug related to functions X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=aa747e4d540a1b9775a107fc73e6b88069db489b;p=klib.git fixed a bug related to functions --- diff --git a/kexpr.c b/kexpr.c index b5e2988..83dba2c 100644 --- a/kexpr.c +++ b/kexpr.c @@ -193,6 +193,10 @@ static ke1_t *ke_parse_core(const char *_s, int *_n, int *err) *err |= KEE_UNRP; break; } else --n_op; // pop out '(' + if (n_op > 0 && op[n_op-1].ttype == KET_FUNC) { + u = push_back(&out, &n_out, &m_out); + *u = op[--n_op]; + } ++p; } else if (*p == ',') { while (n_op > 0 && op[n_op-1].op >= 0) {