bools are int; pointed out by William Wanders <william@wanders.org>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2288 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2005-03-30 16:40:01 +00:00
parent f2526dfd8e
commit d67389dfd6
1 changed files with 2 additions and 2 deletions

View File

@ -875,7 +875,7 @@ static int asn1_decode_entry(sc_context_t *ctx,struct sc_asn1_entry *entry,
sc_error(ctx, "invalid ASN.1 object length: %d\n", objlen);
r = SC_ERROR_INVALID_ASN1_OBJECT;
} else
*((u8 *) parm) = obj[0] ? 1 : 0;
*((int *) parm) = obj[0] ? 1 : 0;
}
break;
case SC_ASN1_INTEGER:
@ -1191,7 +1191,7 @@ static int asn1_encode_entry(sc_context_t *ctx, const struct sc_asn1_entry *entr
r = SC_ERROR_OUT_OF_MEMORY;
break;
}
buf[0] = *((u8 *) parm) ? 0xFF : 0;
buf[0] = *((int *) parm) ? 0xFF : 0;
buflen = 1;
break;
case SC_ASN1_INTEGER: