From 48cf1de356cbd1fe1a85fc1ffe17e5b4246d43b5 Mon Sep 17 00:00:00 2001 From: Luiz Henrique de Figueiredo Date: Thu, 7 Nov 1996 12:13:28 -0200 Subject: replaced unions by memcpy --- undump.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/undump.c b/undump.c index 2d08f811..1b22b9b1 100644 --- a/undump.c +++ b/undump.c @@ -3,7 +3,7 @@ ** load bytecodes from files */ -char* rcs_undump="$Id: undump.c,v 1.14 1996/03/14 17:31:15 lhf Exp $"; +char* rcs_undump="$Id: undump.c,v 1.15 1996/11/07 13:59:51 lhf Exp lhf $"; #include #include @@ -144,12 +144,9 @@ static void Unthread(Byte* code, int i, int v) { Word w; Byte* p=code+i; - Byte* c=&w; - get_word(w,p); - i=w; - w=v; - p[-2]=c[0]; - p[-1]=c[1]; + memcpy(&w,p,sizeof(w)); + i=w; w=v; + memcpy(p,&w,sizeof(w)); } } -- cgit v1.2.3-55-g6feb