From: Gerhard Sittig Date: Wed, 1 Aug 2018 16:35:57 +0000 (+0200) Subject: mdio: accept MDIO READ without previous ADDRESS command X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=389d21d222a503b9f5f43404ced4b10813008b3a mdio: accept MDIO READ without previous ADDRESS command Fix a Python string formatting issue, where the format string disagreed with the argument list. A READ command could unexpectedly terminate the decoder instance when there was no previous ADDRESS command. This fixes bug #1258. --- diff --git a/decoders/mdio/pd.py b/decoders/mdio/pd.py index 9ea3a27..2522912 100644 --- a/decoders/mdio/pd.py +++ b/decoders/mdio/pd.py @@ -95,7 +95,7 @@ class Decoder(srd.Decoder): if self.clause45 and self.clause45_addr != -1: decoded_min += str.format('ADDR: %04X ' % self.clause45_addr) elif self.clause45: - decoded_min += str.format('ADDR: UKWN ' % self.clause45_addr) + decoded_min += str.format('ADDR: UKWN ') if self.clause45 and self.opcode > 1 \ or (not self.clause45 and self.opcode):