aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>1996-11-07 12:13:28 -0200
committerLuiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>1996-11-07 12:13:28 -0200
commit48cf1de356cbd1fe1a85fc1ffe17e5b4246d43b5 (patch)
tree0ccd3f29fe775a9f574802ec07d533f1aea54d02
parent8d50122af03aec0c5271471f95798a5c98f30378 (diff)
downloadlua-48cf1de356cbd1fe1a85fc1ffe17e5b4246d43b5.tar.gz
lua-48cf1de356cbd1fe1a85fc1ffe17e5b4246d43b5.tar.bz2
lua-48cf1de356cbd1fe1a85fc1ffe17e5b4246d43b5.zip
replaced unions by memcpy
-rw-r--r--undump.c11
1 files 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 @@
3** load bytecodes from files 3** load bytecodes from files
4*/ 4*/
5 5
6char* rcs_undump="$Id: undump.c,v 1.14 1996/03/14 17:31:15 lhf Exp $"; 6char* rcs_undump="$Id: undump.c,v 1.15 1996/11/07 13:59:51 lhf Exp lhf $";
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <string.h> 9#include <string.h>
@@ -144,12 +144,9 @@ static void Unthread(Byte* code, int i, int v)
144 { 144 {
145 Word w; 145 Word w;
146 Byte* p=code+i; 146 Byte* p=code+i;
147 Byte* c=&w; 147 memcpy(&w,p,sizeof(w));
148 get_word(w,p); 148 i=w; w=v;
149 i=w; 149 memcpy(p,&w,sizeof(w));
150 w=v;
151 p[-2]=c[0];
152 p[-1]=c[1];
153 } 150 }
154} 151}
155 152