summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compile.c7
-rw-r--r--lib/ops.h2
-rw-r--r--lib/rlib.h5
3 files changed, 9 insertions, 5 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);
diff --git a/lib/ops.h b/lib/ops.h
index 86bc017..45d04f4 100644
--- a/lib/ops.h
+++ b/lib/ops.h
@@ -346,4 +346,4 @@ typedef struct _var_op
-#endif /* __OPS_H__20000616 */ \ No newline at end of file
+#endif /* __OPS_H__20000616 */
diff --git a/lib/rlib.h b/lib/rlib.h
index b5f8b68..faf9561 100644
--- a/lib/rlib.h
+++ b/lib/rlib.h
@@ -34,7 +34,7 @@ typedef unsigned int r_uint;
/*
* r_replace:
* Represents a replacement which was found. This structure is passed
- * to the r_match matching callback function below.
+ * to the r_match matching callback function below.R
*/
typedef struct _r_replace
{
@@ -97,7 +97,7 @@ typedef struct r_stream
r_write fWrite; /* Callback used for output */
r_match fMatch; /* Callback for confirmation or matching */
- r_message fMessage; /* Callback for messages from script */
+ r_message fMessage; /* Callback for messagesR from script */
void* arg; /* Optional data for the above functions */
/* -------- Data returned -------------- */
@@ -223,6 +223,7 @@ void rlibClear(r_stream* stream);
/* ERROR CODES */
+#undef R_OK
/* OK */
#define R_OK 0