fix multibyte tag encoding
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/* as used in ASN.1 tags */
|
||||
size_t fmt_asn1tag(char* dest,enum asn1_tagclass tc,enum asn1_tagtype tt,unsigned long l) {
|
||||
/* encoding is either l%128 or (0x1f,...) */
|
||||
size_t needed=(sizeof l)*7/8,i;
|
||||
size_t needed=((sizeof l)*7)/8,i;
|
||||
if (l<0x1f) {
|
||||
if (dest) *dest=(int)tc+(int)tt+(l&0x1f);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user