commit | 417494060a2d5aff18105cd90f3085b6ba194b81 | [log] [tgz] |
---|---|---|
author | vlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826> | Fri Sep 08 19:34:22 2006 +0000 |
committer | vlm <vlm@59561ff5-6e30-0410-9f3c-9617f08c8826> | Fri Sep 08 19:34:22 2006 +0000 |
tree | 0a1e0c2461e08a98fe5c30520e63d1126525adf7 | |
parent | e690952f312a77abd4d86a548cc0e23a3e6b622e [diff] [blame] |
unused bits git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1156 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1compiler/asn1c_constraint.c b/libasn1compiler/asn1c_constraint.c index b44b4eb..74bbb7a 100644 --- a/libasn1compiler/asn1c_constraint.c +++ b/libasn1compiler/asn1c_constraint.c
@@ -505,7 +505,7 @@ case ASN_BASIC_BIT_STRING: OUT("if(st->size > 0) {\n"); OUT("\t/* Size in bits */\n"); - OUT("\tsize = 8 * (st->size - 1) - (st->buf[0] & 0x7);\n"); + OUT("\tsize = 8 * st->size - (st->bits_unused & 0x07);\n"); OUT("} else {\n"); OUT("\tsize = 0;\n"); OUT("}\n");