aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--skeletons/per_support.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/skeletons/per_support.c b/skeletons/per_support.c
index c8344193..0bb3d4b7 100644
--- a/skeletons/per_support.c
+++ b/skeletons/per_support.c
@@ -193,8 +193,8 @@ per_put_few_bits(asn_per_outp_t *po, uint32_t bits, int obits) {
if(obits <= 0 || obits >= 32) return obits ? -1 : 0;
- ASN_DEBUG("[PER put %d bits to %p+%d bits]",
- obits, po->buffer, po->nboff);
+ ASN_DEBUG("[PER put %d bits %x to %p+%d bits]",
+ obits, bits, po->buffer, po->nboff);
/*
* Normalize position indicator.
@@ -210,7 +210,9 @@ per_put_few_bits(asn_per_outp_t *po, uint32_t bits, int obits) {
*/
if(po->nboff + obits > po->nbits) {
int complete_bytes = (po->buffer - po->tmpspace);
- if(po->outper(po->buffer, complete_bytes, po->op_key) < 0)
+ ASN_DEBUG("[PER output %d complete + %d]",
+ complete_bytes, po->flushed_bytes);
+ if(po->outper(po->tmpspace, complete_bytes, po->op_key) < 0)
return -1;
if(po->nboff)
po->tmpspace[0] = po->buffer[0];