diff options
-rw-r--r-- | crypto/ec/eck_prn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/ec/eck_prn.c b/crypto/ec/eck_prn.c index a911a0ac40..5ef12ec024 100644 --- a/crypto/ec/eck_prn.c +++ b/crypto/ec/eck_prn.c @@ -338,12 +338,14 @@ static int print_bin(BIO *fp, const char *name, const unsigned char *buf, if (buf == NULL) return 1; - if (off) { + if (off > 0) { if (off > 128) off = 128; memset(str, ' ', off); if (BIO_write(fp, str, off) <= 0) return 0; + } else { + off = 0; } if (BIO_printf(fp, "%s", name) <= 0) |