From 68b5e8673ad55421d0a7c8fbfafe65fefade1eff Mon Sep 17 00:00:00 2001 From: hploetz Date: Sun, 26 Nov 2006 05:16:23 +0000 Subject: [PATCH] small bug regarding filler bytes git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@149 f711b948-2313-0410-aaa9-d29f33439f0b --- cards/tcos_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cards/tcos_card.py b/cards/tcos_card.py index 9bddf10..35c2fd8 100644 --- a/cards/tcos_card.py +++ b/cards/tcos_card.py @@ -196,7 +196,7 @@ class TCOS_Security_Environment(object): value_ = TLV_utils.pack( (data, ), recalculate_length=True ) block.append( value_ ) - elif tag in (0xff, 0x00): + elif tag in (0xff, 0x00) and len(block) > 0: block.append( chr(tag) ) else: if len(block) > 0: