Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LibCpp2IL/Metadata/Il2CppMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
return new Il2CppMetadata(new MemoryStream(bytes), unityVersion, actualVersion);
}

private Il2CppMetadata(MemoryStream stream, UnityVersion unityVersion, float metadataVersion) : base(stream)

Check warning on line 174 in LibCpp2IL/Metadata/Il2CppMetadata.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (win-arm64, Cpp2IL)

Non-nullable field 'TypeInlineArrays' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 174 in LibCpp2IL/Metadata/Il2CppMetadata.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (linux-x64, Cpp2IL)

Non-nullable field 'TypeInlineArrays' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 174 in LibCpp2IL/Metadata/Il2CppMetadata.cs

View workflow job for this annotation

GitHub Actions / Build Single-File Artifact (osx-x64, Cpp2IL)

Non-nullable field 'TypeInlineArrays' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
UnityVersion = unityVersion;
MetadataVersion = metadataVersion;
Expand Down Expand Up @@ -420,7 +420,8 @@
foreach (var il2CppFieldDefaultValue in fieldDefaultValues)
{
_fieldDefaultValueLookup[il2CppFieldDefaultValue.fieldIndex] = il2CppFieldDefaultValue;
_fieldDefaultLookupNew[GetFieldDefinitionFromIndex(il2CppFieldDefaultValue.fieldIndex)] = il2CppFieldDefaultValue;
if (il2CppFieldDefaultValue.fieldIndex.IsNonNull)
_fieldDefaultLookupNew[GetFieldDefinitionFromIndex(il2CppFieldDefaultValue.fieldIndex)] = il2CppFieldDefaultValue;
}

LibLogger.VerboseNewline($"OK ({(DateTime.Now - start).TotalMilliseconds} ms)");
Expand Down
5 changes: 4 additions & 1 deletion LibCpp2IL/Metadata/Il2CppVariableWidthIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public static Il2CppVariableWidthIndex<T> Read(ClassReadingBinaryReader reader)
return Null;
return new(val2);
case 4:
return new(reader.ReadInt32());
var val3 = reader.ReadInt32();
if (val3 == int.MaxValue)
return Null;
return new(val3);
default:
throw new Exception($"Invalid width {widthForThisTypeOnCurrentApplication} for Il2CppVariableWidthIndex of type {typeof(T)}.");
}
Expand Down
Loading