I may have found a problem. I'm running this in QB64 3.14 x64 IDE and using ConvertOffset, then this error appears. The solution is to change "Dim offsetTarget as LONG" to "Dim offsetTarget as _Offset" in line 297 and then run the loader as expected.
This is also the reason why I didn't find the error. In 32-bit system, 32-bit values are used to allocate memory. The Long type is 32-bit and therefore in IDE32 it is sufficient and the error does not occur. When the program is run in IDE64, 64-bit values are used to address memory, so the LONG data type overflows and this error occurs. The _Offset data type solves this, in 32-bit IDE it is 4 bytes long and in 64-bit system it is 8 bytes long. I assume that changing the data type will solve it. I'm attaching the image that caused the error (as I did it in the 64-bit IDE in QB64PE 3.14 using the convertoffset function (in Steve's last post in his thread).
Both latest source codes updated. Changed data type to _Offset.
This is also the reason why I didn't find the error. In 32-bit system, 32-bit values are used to allocate memory. The Long type is 32-bit and therefore in IDE32 it is sufficient and the error does not occur. When the program is run in IDE64, 64-bit values are used to address memory, so the LONG data type overflows and this error occurs. The _Offset data type solves this, in 32-bit IDE it is 4 bytes long and in 64-bit system it is 8 bytes long. I assume that changing the data type will solve it. I'm attaching the image that caused the error (as I did it in the 64-bit IDE in QB64PE 3.14 using the convertoffset function (in Steve's last post in his thread).
Both latest source codes updated. Changed data type to _Offset.