-7 <byte-array> crash
parent
53b9883ef8
commit
12f61890ca
|
@ -27,3 +27,5 @@ sequences test errors math-internals ;
|
|||
! Make sure we report the correct error on stack underflow
|
||||
[ { kernel-error 11 f f } ]
|
||||
[ [ clear drop ] catch ] unit-test
|
||||
|
||||
[ -7 <byte-array> ] unit-test-fails
|
||||
|
|
|
@ -46,7 +46,8 @@ F_ARRAY *allot_array(CELL type, F_FIXNUM capacity, CELL fill)
|
|||
/* size is in bytes this time */
|
||||
F_ARRAY *allot_byte_array(F_FIXNUM size)
|
||||
{
|
||||
F_FIXNUM byte_size = (size + sizeof(CELL) - 1) / sizeof(CELL);
|
||||
F_FIXNUM byte_size = (F_FIXNUM)(size + sizeof(CELL) - 1)
|
||||
/ (F_FIXNUM)sizeof(CELL);
|
||||
return allot_array(BYTE_ARRAY_TYPE,byte_size,0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue