Skip to content

Commit

Permalink
Merge pull request #137 from v0-e/whole-os
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse07410 authored Oct 10, 2023
2 parents 989bb0c + 584d86e commit 84d3a59
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions skeletons/OCTET_STRING_jer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 84d3a59

Please sign in to comment.