const char *name;
unsigned char *data;
unsigned char *buf;
- int size;
+ unsigned short size;
int i;
cachepic_t *pic;
VM_SAFEPARMCOUNT(0, VM_CL_ReadPicture);
name = MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring));
- size = MSG_ReadShort(&cl_message);
+ size = (unsigned short) MSG_ReadShort(&cl_message);
// check if a texture of that name exists
// if yes, it is used and the data is discarded
VM_SAFEPARMCOUNT(3, VM_SV_WritePicture);
imgname = PRVM_G_STRING(OFS_PARM1);
- size = (int) PRVM_G_FLOAT(OFS_PARM2);
+ size = (size_t) PRVM_G_FLOAT(OFS_PARM2);
if(size > 65535)
size = 65535;