X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=util.c;h=8b54251c76ed447e52c4b15f38b70b7888745c98;hb=905ca8819be928af10cf79a904ec44d458a988eb;hp=a900889e57b90f983d776c44326e02935d9eee7b;hpb=61fa54318c3aa1ce0c2099f9793d830e5896c016;p=xonotic%2Fgmqcc.git diff --git a/util.c b/util.c index a900889..8b54251 100644 --- a/util.c +++ b/util.c @@ -270,8 +270,8 @@ void util_endianswap(void *m, int s, int l) { if(*((char *)&s)) return; - for(; w < l; w++) { - for(; i < s << 1; i++) { + for(; w < (size_t)l; w++) { + for(; i < (size_t)(s << 1); i++) { unsigned char *p = (unsigned char *)m+w*s; unsigned char t = p[i]; p[i] = p[s-i-1];