]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - csprogs.c
Fixed a large number of WIN64 type conversion warnings.
[xonotic/darkplaces.git] / csprogs.c
index e9295bce7cb144dd103e3a533bd5d46949433b44..77b0daebec454f1f6b29e0270433871fb8bab89f 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -942,7 +942,7 @@ static qboolean CLVM_load_edict(prvm_prog_t *prog, prvm_edict_t *ent)
 qboolean MakeDownloadPacket(const char *filename, unsigned char *data, size_t len, int crc, int cnt, sizebuf_t *buf, int protocol)
 {
        int packetsize = buf->maxsize - 7; // byte short long
-       int npackets = (len + packetsize - 1) / (packetsize);
+       int npackets = ((int)len + packetsize - 1) / (packetsize);
        char vabuf[1024];
 
        if(protocol == PROTOCOL_QUAKEWORLD)
@@ -958,7 +958,7 @@ qboolean MakeDownloadPacket(const char *filename, unsigned char *data, size_t le
        else if(cnt >= 1 && cnt <= npackets)
        {
                unsigned long thispacketoffset = (cnt - 1) * packetsize;
-               int thispacketsize = len - thispacketoffset;
+               int thispacketsize = (int)len - thispacketoffset;
                if(thispacketsize > packetsize)
                        thispacketsize = packetsize;