Commit 584d86e2 authored by v0-e's avatar v0-e

Continuous OCTET STRING JER string

parent 989bb0ca
......@@ -30,22 +30,19 @@ OCTET_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
*/
buf = st->buf;
end = buf + st->size;
ASN__CALLBACK("\"", 1);
for(i = 0; buf < end; buf++, i++) {
if(!(i % 16) && (i || st->size > 16)) {
ASN__CALLBACK(scratch, p-scratch);
p = scratch;
ASN__TEXT_INDENT(1, ilevel);
}
*p++ = h2c[(*buf >> 4) & 0x0F];
*p++ = h2c[*buf & 0x0F];
*p++ = 0x20;
}
if(p - scratch) {
p--; /* Remove the tail space */
ASN__CALLBACK3("\"", 1, scratch, p-scratch, "\"", 1); /* Dump the rest */
if(st->size > 16)
ASN__TEXT_INDENT(1, ilevel-1);
ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */
}
ASN__CALLBACK("\"", 1);
ASN__ENCODED_OK(er);
cb_failed:
......
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