Commit cb2b2d16 authored by Lev Walkin's avatar Lev Walkin

measured in bits

parent 7b1b9ab5
......@@ -481,7 +481,7 @@ emit_size_determination_code(arg_t *arg, asn1p_expr_type_e etype) {
case ASN_BASIC_BIT_STRING:
OUT("if(st->size > 0) {\n");
OUT("\t/* Size in bits */\n");
OUT("\tsize = (st->size - 1) - (st->buf[0] & 0x7);\n");
OUT("\tsize = 8 * (st->size - 1) - (st->buf[0] & 0x7);\n");
OUT("} else {\n");
OUT("\tsize = 0;\n");
OUT("}\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment