Skip to content

Commit

Permalink
Fix overflow in TryGetLiteralAt
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 authored and gompoc committed Dec 24, 2024
1 parent 59a1e51 commit a571fcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cpp2IL.Core/Utils/MiscUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal static string[] GetGenericParams(string input)

public static string? TryGetLiteralAt(Il2CppBinary theDll, ulong rawAddr)
{
if (theDll.RawLength <= (long)rawAddr)
if ((ulong)theDll.RawLength <= rawAddr)
return null;

var c = Convert.ToChar(theDll.GetByteAtRawAddress(rawAddr));
Expand Down

0 comments on commit a571fcb

Please sign in to comment.