mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-15 21:35:01 +00:00
Fix reading 0-length string data
This commit is contained in:
@@ -1356,7 +1356,8 @@ namespace BurnOutSharp.Builder
|
||||
while ((offset % 4) != 0)
|
||||
stringData.Padding = entry.Data.ReadUInt16(ref offset);
|
||||
|
||||
stringData.Value = entry.Data.ReadString(ref offset, Encoding.Unicode);
|
||||
if (stringData.ValueLength != 0)
|
||||
stringData.Value = entry.Data.ReadString(ref offset, Encoding.Unicode);
|
||||
|
||||
while ((offset % 4) != 0)
|
||||
_ = entry.Data.ReadUInt16(ref offset);
|
||||
@@ -1470,7 +1471,8 @@ namespace BurnOutSharp.Builder
|
||||
while ((offset % 4) != 0)
|
||||
stringData.Padding = entry.Data.ReadUInt16(ref offset);
|
||||
|
||||
stringData.Value = entry.Data.ReadString(ref offset, Encoding.Unicode);
|
||||
if (stringData.ValueLength != 0)
|
||||
stringData.Value = entry.Data.ReadString(ref offset, Encoding.Unicode);
|
||||
|
||||
while ((offset % 4) != 0)
|
||||
_ = entry.Data.ReadUInt16(ref offset);
|
||||
|
||||
Reference in New Issue
Block a user