Branch: Tag:

2022-07-24

2022-07-24 08:03:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

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;    }