Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BMP File format
#7
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.


Attached Files Image(s)
   


Reply


Messages In This Thread
BMP File format - by Petr - 02-17-2025, 09:39 PM
RE: BMP File format - by Petr - 02-20-2025, 09:45 PM
RE: BMP File format - by Petr - 02-22-2025, 01:01 PM
RE: BMP File format - by Steffan-68 - 02-23-2025, 10:11 AM
RE: BMP File format - by Petr - 02-23-2025, 11:29 AM
RE: BMP File format - by SMcNeill - 02-23-2025, 11:48 AM
RE: BMP File format - by Petr - 02-23-2025, 12:02 PM
RE: BMP File format - by Steffan-68 - 02-23-2025, 12:38 PM
RE: BMP File format - by Petr - 02-23-2025, 07:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  APNG File Format Petr 5 567 11-20-2025, 02:32 PM
Last Post: ahenry3068
  AVI file format Petr 18 3,313 08-03-2025, 01:03 AM
Last Post: madscijr
  GIF89a File Format Petr 6 1,373 03-04-2025, 01:20 AM
Last Post: a740g
  PCX file format Petr 13 3,457 03-01-2025, 10:52 PM
Last Post: Petr

Forum Jump:


Users browsing this thread: 1 Guest(s)