pike.git/
src/
operators.c
Branch:
Tag:
Non-build tags
All tags
No tags
2022-07-24
2022-07-24 08:03:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>
c5fd7abb30e55e3bc1cc9558e2c4c845590fa9ab (
10
lines) (+
9
/-
1
)
[
Show
|
Annotate
]
Branch:
master
EFUNs: UNDEFINED + UNDEFINED now results in UNDEFINED (rather than 0).
1765:
case BIT_INT: { INT_TYPE size = Pike_sp[-args].u.integer;
+
int all_undef = !size && SUBTYPEOF(Pike_sp[-args]);
for(e = -args+1; e < 0; e++) { if (DO_INT_TYPE_ADD_OVERFLOW(size, Pike_sp[e].u.integer, &size))
1773:
f_add(args); return; }
+
all_undef = all_undef && !size && SUBTYPEOF(Pike_sp[e]);
} Pike_sp-=args;
-
+
if (all_undef) {
+
/* Adding UNDEFINED's give UNDEFINED. */
+
push_undefined();
+
} else {
push_int(size);
-
+
}
break; }