fixed VM crash while printing pointer value
@@ -306,6 +306,17 @@ void ring_vm_listpushv ( VM *pVM )
RING_VM_STACK_OBJTYPE = RING_OBJTYPE_LISTITEM ;
ring_vm_oop_setbraceobj(pVM, (List *) ring_item_getlist(pItem));
}
+ else if ( ring_item_gettype(pItem) == ITEMTYPE_POINTER ) {
+ if ( pVM->nRetItemRef > 0 ) {
+ pVM->nRetItemRef-- ;
+ if ( (ring_vm_isstackpointertoobjstate(pVM) == 1) ) {
+ RING_VM_STACK_SETPVALUE(pItem);
+ RING_VM_STACK_OBJTYPE = RING_OBJTYPE_LISTITEM ;
+ return ;
+ }
+ }
+ RING_VM_STACK_SETCVALUE2(NULL,0);
+ }
}
void ring_vm_listassignment ( VM *pVM )
