Reduce length by 1 if there is a trailing zero at the end
This commit is contained in:
		@@ -285,6 +285,7 @@ class DataTLV(TLV):
 | 
				
			|||||||
        self.data = raw_data[14:len(self)]
 | 
					        self.data = raw_data[14:len(self)]
 | 
				
			||||||
        if self.data[-1] == 0:
 | 
					        if self.data[-1] == 0:
 | 
				
			||||||
            self.data = self.data[:-1]
 | 
					            self.data = self.data[:-1]
 | 
				
			||||||
 | 
					            self.length -= 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def marshal(self) -> bytes:
 | 
					    def marshal(self) -> bytes:
 | 
				
			||||||
        return self.type.to_bytes(1, sys.byteorder) + \
 | 
					        return self.type.to_bytes(1, sys.byteorder) + \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user