From 3f1f9a84dbb54cc6c61174b62056cb4acd71faa1 Mon Sep 17 00:00:00 2001 From: elie Date: Sun, 27 Jan 2013 20:59:15 +0000 Subject: fix to substrate debugging in indefinite --- pyasn1/codec/ber/decoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 2209ef0..b7330a9 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -647,7 +647,7 @@ class Decoder: '%d-octet short' % (length - len(substrate)) ) state = stGetValueDecoder - debug.logger and debug.logger & debug.flagDecoder and debug.logger('value length decoded into %d, payload substrate is: %s' % (length, debug.hexdump(substrate[:length]))) + debug.logger and debug.logger & debug.flagDecoder and debug.logger('value length decoded into %d, payload substrate is: %s' % (length, debug.hexdump(length == -1 and substrate or substrate[:length]))) if state == stGetValueDecoder: if asn1Spec is None: state = stGetValueDecoderByTag -- cgit v1.2.1