mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 01:41:37 +08:00
Fix coverity issue: memory corruption due to overlapping copy.
This commit is contained in:
@@ -592,12 +592,12 @@ retry:
|
||||
|
||||
if (x->type == JS_TBOOLEAN) {
|
||||
x->type = JS_TNUMBER;
|
||||
x->u.number = x->u.boolean;
|
||||
x->u.number = x->u.boolean ? 1 : 0;
|
||||
goto retry;
|
||||
}
|
||||
if (y->type == JS_TBOOLEAN) {
|
||||
y->type = JS_TNUMBER;
|
||||
y->u.number = y->u.boolean;
|
||||
y->u.number = y->u.boolean ? 1 : 0;
|
||||
goto retry;
|
||||
}
|
||||
if ((JSV_ISSTRING(x) || x->type == JS_TNUMBER) && y->type == JS_TOBJECT) {
|
||||
|
||||
Reference in New Issue
Block a user