bugfix: string parser, empty value for single element

This commit is contained in:
Giovanni Fattori
2024-07-06 00:00:16 +02:00
parent d574eb113c
commit d49dded1cc
2 changed files with 5 additions and 3 deletions

View File

@ -169,9 +169,11 @@ def bmms_bin_entry_genericparser(pcDataBuf):
sList = pcDataBuf[st_ReadedBytes:st_ReadedBytes + uiSize-8].split(b'\b') sList = pcDataBuf[st_ReadedBytes:st_ReadedBytes + uiSize-8].split(b'\b')
mList = [] mList = []
for mStr in sList[1:]: for mStr in sList:
mList.append(mStr.rstrip(b'\0').decode('utf-8')) mList.append(mStr.rstrip(b'\0').decode('utf-8'))
mList
if uiType == 0xa5000000 and len(mList)>0:
mList.pop(0)
mEntry['Val'] = mList mEntry['Val'] = mList
case 0xc5000000 : case 0xc5000000 :

View File

@ -134,7 +134,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [