Branch: Tag:

2016-03-19

2016-03-19 20:21:46 by Martin Nilsson <nilsson@fastmail.com>

Added some return value paranoia.

34:    apply_svalue((struct svalue *)f, 1);    if(TYPEOF(Pike_sp[-1])!=T_STRING)    Pike_error("Random function did not return string value.\n"); -  if((unsigned)Pike_sp[-1].u.string->len != (unsigned)num) +  if((unsigned)Pike_sp[-1].u.string->len != (unsigned)num || +  Pike_sp[-1].u.string->size_shift != 0)    Pike_error("Random function did not return correct number of bytes.\n");    memcpy(out, Pike_sp[-1].u.string->str, num);    pop_stack();