From 466c075d0b4306fdc13eb0e844505706d2ed14ce Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 15 Apr 2022 20:38:31 -0300 Subject: [PATCH] Fix one more instance of Intel AMI with no string getting a string --- biostools/analyzers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index fac8790..e1d9918 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -474,7 +474,11 @@ class AMIAnalyzer(Analyzer): if c & 0x80: # MSB termination break self.string = bytes(buf).decode('cp437', 'ignore') - self.debug_print('Base string:', self.string) + if len(self.string) <= 6: # (later Intel AMI with no string) + self.string = '' + self.debug_print('Intel with no string') + else: + self.debug_print('Base string:', self.string) # Remove "-K" KBC suffix. # Note: K without preceding - is possible (Atari PC5)