1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 19:40:54 +00:00
Condition的clone方法,params存在共享内存,导致isCond死循环。
This commit is contained in:
cruis 2020-11-11 16:12:57 +08:00
parent c5c03815f3
commit 8f3fd317da

View File

@ -152,5 +152,8 @@ func (c *Condition) IsEmpty() bool {
// clone clone a condition // clone clone a condition
func (c Condition) clone() *Condition { func (c Condition) clone() *Condition {
params := make([]condValue, len(c.params))
copy(params, c.params)
c.params = params
return &c return &c
} }