summaryrefslogtreecommitdiff
path: root/src/qcommon/vm_interpreted.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 11:58:50 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:34 +0000
commitac3e5586cd56657ff1b6f5f64af7e1d7c76b410d (patch)
treeb245f2cbd4e7491b948aea5c7c080be61307c950 /src/qcommon/vm_interpreted.c
parentdc3819f1e99d8159bdb0ea1da26506b00fe78e62 (diff)
* Merge ioq3-r1458
Diffstat (limited to 'src/qcommon/vm_interpreted.c')
-rw-r--r--src/qcommon/vm_interpreted.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/qcommon/vm_interpreted.c b/src/qcommon/vm_interpreted.c
index f9071669..eb14e94b 100644
--- a/src/qcommon/vm_interpreted.c
+++ b/src/qcommon/vm_interpreted.c
@@ -481,7 +481,7 @@ nextInstruction2:
case OP_BLOCK_COPY:
{
int *src, *dest;
- int i, count, srci, desti;
+ int count, srci, desti;
count = r2;
// MrE: copy range check
@@ -490,16 +490,10 @@ nextInstruction2:
count = ((srci + count) & dataMask) - srci;
count = ((desti + count) & dataMask) - desti;
- src = (int *)&image[ r0&dataMask ];
- dest = (int *)&image[ r1&dataMask ];
- if ( ( (intptr_t)src | (intptr_t)dest | count ) & 3 ) {
- // happens in westernq3
- Com_Printf( S_COLOR_YELLOW "Warning: OP_BLOCK_COPY not dword aligned\n");
- }
- count >>= 2;
- for ( i = count-1 ; i>= 0 ; i-- ) {
- dest[i] = src[i];
- }
+ src = (int *)&image[ srci ];
+ dest = (int *)&image[ desti ];
+
+ memcpy(dest, src, count);
programCounter += 4;
opStack -= 2;
}