dalf: read_string_list() now based on read_string()

This commit is contained in:
weiju 2023-10-30 14:02:35 -07:00
parent ef21260fd4
commit 05a19685b6
1 changed files with 9 additions and 9 deletions

View File

@ -47,15 +47,6 @@ def read_int16(infile):
def read_uint16(infile):
return struct.unpack('>H', infile.read(2))[0]
def read_string_list(infile):
result = []
strlen = read_int32(infile)
while strlen > 0:
result.append(str(infile.read(strlen)))
strlen = read_int32(infile)
return []
def read_string(infile):
result = None
@ -67,6 +58,15 @@ def read_string(infile):
return result[:idx]
def read_string_list(infile):
result = []
s = read_string(infile)
while s is not None:
result.append(s)
s = read_string(infile)
return result
def read_symbols(infile):
result = []
symbol = read_string(infile)