Skip to content

Commit 64a2bb3

Browse files
committed
fix unity version parsing breaking with three letter metadata versions
1 parent 8c0ef09 commit 64a2bb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Il2CppInspector.Common/Cpp/UnityHeaders/UnityVersion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ public static UnityVersionRange FromFilename(string headerFilename) {
176176
var bits = headerFilename.Split("-");
177177

178178
// Metadata version supplied
179-
// Note: This relies on the metadata version being either 2 or 4 characters,
179+
// Note: This relies on the metadata version being 2/3/4 characters,
180180
// and that the smallest Unity version must be 5 characters or more
181-
if (headerFilename[2] == '-' || headerFilename[4] == '-')
181+
if (headerFilename.Substring(2, 3).Contains('-'))
182182
bits = bits.Skip(1).ToArray();
183183

184184
var Min = new UnityVersion(bits[0]);

0 commit comments

Comments
 (0)