diff --git a/fmt/fmt_asn1derlength.c b/fmt/fmt_asn1derlength.c index 2ab3c91..263d473 100644 --- a/fmt/fmt_asn1derlength.c +++ b/fmt/fmt_asn1derlength.c @@ -13,11 +13,11 @@ size_t fmt_asn1derlength(char* dest,unsigned long long l) { if (!(l>>(i*8))) break; if (dest) { - int j=i; - *dest=0x80+i; ++dest; + size_t j=i; + *dest=(char)(0x80+i); ++dest; while (j) { --j; - *dest=((l>>(j*8))&0xff); + *dest=(char)((l>>(j*8))&0xff); ++dest; } } diff --git a/fmt/fmt_asn1dertag.c b/fmt/fmt_asn1dertag.c index dc5452f..c91f506 100644 --- a/fmt/fmt_asn1dertag.c +++ b/fmt/fmt_asn1dertag.c @@ -8,7 +8,7 @@ size_t fmt_asn1dertag(char* dest,unsigned long long l) { unsigned long long t; for (t=l, n=1; t>0x7f; t>>=7) ++n; for (i=0; i>=7; } return i;