colinator27 / DogScepter

A work-in-progress modding tool geared toward UNDERTALE/DELTARUNE
MIT License
45 stars 15 forks source link

DogScepter reading out of bounds in FONT chunk #46

Open Miepee opened 2 years ago

Miepee commented 2 years ago

There are a few games getting an exception trying to read out of bounds in a font chunk:

System.IO.IOException: Reading out of bounds
   at DogScepterLib.Core.Util.BufferBinaryReader.ReadUInt16() in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\Util\BufferBinaryReader.cs:line 81
   at DogScepterLib.Core.Models.GMGlyph.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\Models\GMFont.cs:line 111
   at DogScepterLib.Core.GMDataReader.ReadPointerObjectUnique[T](Int32 ptr, Boolean returnAfter) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMDataReader.cs:line 181
   at DogScepterLib.Core.GMPointerList`1.DoReadPointerObjectUnique(GMDataReader reader, Boolean notLast) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line 167
   at DogScepterLib.Core.GMPointerList`1.Deserialize(GMDataReader reader, ListDeserialize before, ListDeserialize after, ListDeserializeElement elemReader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line
191
   at DogScepterLib.Core.GMPointerList`1.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line 199
   at DogScepterLib.Core.Models.GMFont.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\Models\GMFont.cs:line 75
   at DogScepterLib.Core.GMDataReader.ReadPointerObjectUnique[T](Int32 ptr, Boolean returnAfter) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMDataReader.cs:line 181
   at DogScepterLib.Core.GMPointerList`1.DoReadPointerObjectUnique(GMDataReader reader, Boolean notLast) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line 167
   at DogScepterLib.Core.GMPointerList`1.Deserialize(GMDataReader reader, ListDeserialize before, ListDeserialize after, ListDeserializeElement elemReader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line
191
   at DogScepterLib.Core.GMPointerList`1.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMLists.cs:line 199
   at DogScepterLib.Core.Chunks.GMChunkFONT.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\Chunks\GMChunkFONT.cs:line 38
   at DogScepterLib.Core.GMChunkFORM.Deserialize(GMDataReader reader) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMChunk.cs:line 170
   at DogScepterLib.Core.GMDataReader.Deserialize(Boolean clearData) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Core\GMDataReader.cs:line 58
   at DogScepterCLI.ConsoleExtensions.LoadDataFile(IConsole console, String file, Boolean verbose) in C:\Users\narr\gitrepos\dog-scepter\DogScepterCLI\ConsoleExtensions.cs:line 127 

an island of light, hallucia, troll physics, rock salad, the space man who thinks of the sea, fizix, clock escape, atonement, this is what i call a bad situation