tags 324025 -patch thanks The patch in this bug is horribly wrong.
diff -urN ../tmp-orig/aqsis-1.1.0.20050815/libshadervm/shadervm.cpp
./libshadervm/shadervm.cpp
--- ../tmp-orig/aqsis-1.1.0.20050815/libshadervm/shadervm.cpp 2005-08-15
09:04:44.000000000 +0000
+++ ./libshadervm/shadervm.cpp 2005-08-21 12:44:02.000000000 +0000
@@ -1092,7 +1092,7 @@
// We have an initialiser we have not run yet
if((*candidate)->init){
(*candidate)->initData =
-
((*candidate)->init)((int)((void*)this),NULL);
+
((*candidate)->init)((long)((void*)this),NULL);
};
(*candidate)->initialised = true;
};
The prototype of ((*candidate)->init) is
typedef void* (*DSOInit)(int,void *);
Casting "this" to a long instead of an int does *not* fix this bug on 64-bit
systems, it just papers over it so that the compiler can't see it -- the
value of "this" will still be truncated to an int when passed to the
function!
Further investigation is needed here to determine a correct fix. The
obvious one would be to promote the first arg of DSOInit to 'long', but this
isn't necessarily correct either.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
[EMAIL PROTECTED] http://www.debian.org/
signature.asc
Description: Digital signature

