Fix a hang if you do 'clear drop datastack'

slava 2006-11-17 06:51:29 +00:00
parent 3eb17b5975
commit fde3ba3bb3
1 changed files with 3 additions and 1 deletions

View File

@ -245,7 +245,9 @@ void primitive_from_r(void)
void stack_to_vector(CELL bottom, CELL top)
{
CELL depth = (top - bottom + CELLS) / CELLS;
F_FIXNUM depth = (F_FIXNUM)(top - bottom + CELLS) / CELLS;
if(depth < 0)
depth = 0;
F_ARRAY *a = allot_array_internal(ARRAY_TYPE,depth);
memcpy(a + 1,(void*)bottom,depth * CELLS);
dpush(tag_object(a));