From b77d3fd1c52646803fc00e96ab9a5a9f1755cc39 Mon Sep 17 00:00:00 2001 From: Kazuki Suzuki Przyborowski Date: Wed, 28 Feb 2024 18:24:15 -0600 Subject: [PATCH] Update pycatfile.py --- pycatfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pycatfile.py b/pycatfile.py index 363b197..9764ac6 100755 --- a/pycatfile.py +++ b/pycatfile.py @@ -401,7 +401,14 @@ def ReadFileHeaderDataAlt(fp, rounds=0): """Read multiple null-byte terminated strings from a file.""" header_out = {} for round_count in range(rounds): - header_out[round_count] = read_till_null_byte(fp); + header_out[round_count] = ReadTillNullByteAlt(fp); + return header_out; + +def ReadFileHeaderDataByListAlt(fp, listval=[]): + """Read multiple null-byte terminated strings from a file.""" + header_out = {} + for round_count in listval: + header_out[round_count] = ReadTillNullByteAlt(fp); return header_out; def AppendNullByteAlt(indata):