Tidy up FileFormatReader stream access methods

This commit is contained in:
Katy Coe
2019-10-23 23:51:16 +02:00
parent 19127a6649
commit 1a3028087d
6 changed files with 37 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
All rights reserved.
*/
@@ -50,7 +50,7 @@ namespace Il2CppInspector
image.Position += 8;
funcPtr = image.MapVATR(image.ReadUInt32() + image.GlobalOffset);
if (funcPtr > image.Stream.BaseStream.Length)
if (funcPtr > image.Length)
return (0, 0);
// Extract Metadata pointer