Minor bug fixes.
This commit is contained in:
parent
0f4e0d50c6
commit
bd1fa5784c
Binary file not shown.
@ -64,7 +64,7 @@ namespace RobloxFiles
|
|||||||
internal double readDouble() => reader.ReadDouble();
|
internal double readDouble() => reader.ReadDouble();
|
||||||
internal string readString() => reader.ReadString(true);
|
internal string readString() => reader.ReadString(true);
|
||||||
|
|
||||||
private Attribute[] readArray()
|
internal Attribute[] readArray()
|
||||||
{
|
{
|
||||||
int count = readInt();
|
int count = readInt();
|
||||||
var result = new Attribute[count];
|
var result = new Attribute[count];
|
||||||
@ -75,7 +75,7 @@ namespace RobloxFiles
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private object readEnum()
|
internal object readEnum()
|
||||||
{
|
{
|
||||||
string name = readString();
|
string name = readString();
|
||||||
int value = readInt();
|
int value = readInt();
|
||||||
@ -220,6 +220,12 @@ namespace RobloxFiles
|
|||||||
{
|
{
|
||||||
private void initialize(BinaryReader reader)
|
private void initialize(BinaryReader reader)
|
||||||
{
|
{
|
||||||
|
Stream stream = reader.BaseStream;
|
||||||
|
|
||||||
|
if (stream.Length - stream.Position < 4)
|
||||||
|
// Not enough room to read the entry count, possibly empty?
|
||||||
|
return;
|
||||||
|
|
||||||
int numEntries = reader.ReadInt32();
|
int numEntries = reader.ReadInt32();
|
||||||
|
|
||||||
for (int i = 0; i < numEntries; i++)
|
for (int i = 0; i < numEntries; i++)
|
||||||
|
@ -49,7 +49,10 @@ namespace RobloxFiles.XmlFormat
|
|||||||
{
|
{
|
||||||
string propType = prop.XmlToken;
|
string propType = prop.XmlToken;
|
||||||
|
|
||||||
if (prop.XmlToken.Length == 0)
|
if (propType == null)
|
||||||
|
propType = "";
|
||||||
|
|
||||||
|
if (propType.Length == 0)
|
||||||
{
|
{
|
||||||
propType = GetEnumName(prop.Type);
|
propType = GetEnumName(prop.Type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user