<html>
<head>
<base href="https://bugzilla.icculus.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:smcv-ioquake3@pseudorandom.co.uk" title="Simon McVittie <smcv-ioquake3@pseudorandom.co.uk>"> <span class="fn">Simon McVittie</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - QVM memset and memcpy return NULL"
href="https://bugzilla.icculus.org/show_bug.cgi?id=5935">bug 5935</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>smcv-ioquake3@pseudorandom.co.uk
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - QVM memset and memcpy return NULL"
href="https://bugzilla.icculus.org/show_bug.cgi?id=5935#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - QVM memset and memcpy return NULL"
href="https://bugzilla.icculus.org/show_bug.cgi?id=5935">bug 5935</a>
from <span class="vcard"><a class="email" href="mailto:smcv-ioquake3@pseudorandom.co.uk" title="Simon McVittie <smcv-ioquake3@pseudorandom.co.uk>"> <span class="fn">Simon McVittie</span></a>
</span></b>
<pre>Instead of changing the behaviour of syscalls -101 and -102, perhaps it would
be better to change their names to trap_memset0 and trap_memcpy0, and change
bg_lib.h like this?
// *_syscalls.asm --------------------------------------------------
// Like ISO C memset, but returns NULL instead of dest
equ trap_memset0 -101
// Like ISO C memcpy, but returns NULL instead of dest
equ trap_memcpy0 -102
// bg_lib.h --------------------------------------------------------
void *trap_memset0( void *dest, int c, size_t count );
void *trap_memcpy0( void *dest, const void *src, size_t count );
#define memset(dest, c, count) (trap_memset0(dest, c, count), dest)
#define memcpy(dest, src, count) (trap_memcpy0(dest, src, count), dest)
That way, any VMs compiled with an old bg_lib.h (mods are expected to supply
their own copy, right?) will get the result they expects, and any VMs compiled
with a new bg_lib.h (notably ioquake3's own game/cgame/ui) will get the result
*they* expect, consistent with what they'd get as native code.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>