]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Ptr must check is assigned
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 2 Oct 2019 19:22:34 +0000 (21:22 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 2 Oct 2019 19:22:34 +0000 (21:22 +0200)
src/lib/ptr.c

index 2de8082a698fcc070a6656e99f8f2b768c7bb5c0..f79123a4607d0657162fa1228840a9c32a9a4b97 100644 (file)
@@ -75,6 +75,8 @@ static OP_CHECK(opck_implicit_ptr) {
 
 static INSTR(instr_ptr_deref) {
   const M_Object o = *(M_Object*)REG(-SZ_INT);
+  if(!*(m_bit**)o->data)
+    Except(shred, _("EmptyPointerExecption"));
   if(instr->m_val2)
     memcpy(REG(-SZ_INT), o->data, SZ_INT);
   else {