nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
119 stars 28 forks source link

Prevent adjustCodePointers throwing out of range errors when debugging #134

Closed ollydev closed 5 years ago

ollydev commented 5 years ago

In the future ideally all the Integer related to byte code should be replaced with TCodePos or TCodeOffset.

nielsAD commented 5 years ago

Does this actually solve the out of range errors, because it's still mixing signed and unsigned integers?

ollydev commented 5 years ago

@nielsAD This is what is happening but at runtime: img with i being FCodePointers[i]^ which is SizeUInt

Yeah this PR is bogus, it does fix it though but I think FPC is just being weird.

Maybe we should just disable rangechecks in this function.

ollydev commented 5 years ago

To add to this, this only happens with a empty script. But i'm going to close this for now.