summaryrefslogtreecommitdiff
path: root/lib/compile.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-04-07 20:13:04 +0000
committerStef Walter <stef@thewalter.net>2004-04-07 20:13:04 +0000
commita367e18f1faa1b3b60249f82f18bfbd85669603f (patch)
tree39262d368da7f8698bb9315c31ebda12db0fa57a /lib/compile.c
parent58523416357dd391c7db7cec6d96a36ce29adece (diff)
Linux port
Diffstat (limited to 'lib/compile.c')
-rw-r--r--lib/compile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compile.c b/lib/compile.c
index e92a2f6..b0cd818 100644
--- a/lib/compile.c
+++ b/lib/compile.c
@@ -399,6 +399,7 @@ static void pushValues(compilecontext* ctx, bool forward, ...)
{
va_list ap;
size_t len;
+ int temp;
#define VAL_BUF 20
byte buff[VAL_BUF];
@@ -416,10 +417,12 @@ static void pushValues(compilecontext* ctx, bool forward, ...)
switch(len)
{
case 1:
- buff[cur] = va_arg(ap, byte);
+ temp = va_arg(ap, unsigned int);
+ buff[cur] = (byte)temp;
break;
case 2:
- *((unsigned short*)(buff + cur)) = va_arg(ap, unsigned short);
+ temp = va_arg(ap, unsigned int);
+ *((unsigned short*)(buff + cur)) = (unsigned short)temp;
break;
case 4:
*((unsigned int*)(buff + cur)) = va_arg(ap, unsigned int);