is too short. Must be fixed. There are some other obvious bugs as
well. */
/*
- * $Id$
- * $Log$
- * Revision 1.1 2000/09/13 17:45:16 priikone
- * Splitted SILC core library. Core library includes now only
- * SILC protocol specific stuff. New utility library includes the
- * old stuff from core library that is more generic purpose stuff.
- *
- * Revision 1.2 2000/07/05 06:06:35 priikone
- * Global cosmetic change.
- *
- * Revision 1.1.1.1 2000/06/27 11:36:55 priikone
- * Imported from internal CVS/Added Log headers.
- *
- *
- */
+ * $Id$ */
#include "silcincludes.h"
switch(fmt) {
case SILC_BUFFER_PARAM_SI8_CHAR:
{
- char x = va_arg(ap, char);
+ char x = (char)va_arg(ap, int);
silc_buffer_put(dst, &x, 1);
silc_buffer_pull(dst, 1);
break;
}
case SILC_BUFFER_PARAM_UI8_CHAR:
{
- unsigned char x = va_arg(ap, unsigned char);
+ unsigned char x = (unsigned char)va_arg(ap, int);
silc_buffer_put(dst, &x, 1);
silc_buffer_pull(dst, 1);
break;
case SILC_BUFFER_PARAM_SI16_SHORT:
{
unsigned char xf[2];
- short x = va_arg(ap, short);
+ short x = (short)va_arg(ap, int);
SILC_PUT16_MSB(x, xf);
silc_buffer_put(dst, xf, 2);
silc_buffer_pull(dst, 2);
case SILC_BUFFER_PARAM_UI16_SHORT:
{
unsigned char xf[2];
- unsigned short x = va_arg(ap, unsigned short);
+ unsigned short x = (unsigned short)va_arg(ap, int);
SILC_PUT16_MSB(x, xf);
silc_buffer_put(dst, xf, 2);
silc_buffer_pull(dst, 2);