From 3eb42cf184e119d334b6e62233284fa5f660e4af Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 8 Oct 2019 14:56:53 +0200 Subject: [PATCH] :art: Ptr coverage --- src/lib/ptr.c | 2 +- tests/error/empty_ptr.gw | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/error/empty_ptr.gw diff --git a/src/lib/ptr.c b/src/lib/ptr.c index f6629c16..59a0d477 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -76,7 +76,7 @@ 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")); + Except(shred, _("EmptyPointerException")); if(instr->m_val2) memcpy(REG(-SZ_INT), o->data, SZ_INT); else { diff --git a/tests/error/empty_ptr.gw b/tests/error/empty_ptr.gw new file mode 100644 index 00000000..052bbb2d --- /dev/null +++ b/tests/error/empty_ptr.gw @@ -0,0 +1,3 @@ +#! [contains] EmptyPointerException +<~int~>Ptr t; +<<< *t >>>; -- 2.43.0