The following source was created by a tool i wrote. When i try to compile it with the windows 5.70 x86 or x64 LTS version, the compiler crashes with a request to report it as a bug. Can somebody verify it to see if it happens with their compiler version too or if i made a mistake?
EncodeProblem.pb
The tool encoded and created smaller files successfully.
Thanks in advance and have a happy weekend
Bug or my mistake?
Re: Bug or my mistake?
Your problem with DataSection
Use instead :
Use instead :
Code: Select all
DataMessage.s = "SVRTRgMAAABgAAAAAQAAAF......."
DataMessage.s + "AAAAAAAAAAAAAA......................"
....
....
FileName$ = "winmessage.chm"
*DecodeBuffer = UTF8(DataMessage.s)
Encoded$ = Base64Encoder(*DecodeBuffer, MemorySize(*DecodeBuffer))
Debug "Encoded: " + Encoded$
count = MemorySize(*DecodeBuffer)
*DecodedBuffer = AllocateMemory(count)
Base64Decoder(Encoded$, *DecodedBuffer, count)
Debug "Decoded: " + PeekS(*DecodedBuffer, -1, #PB_UTF8)
Egypt my love
Re: Bug or my mistake?
Thanks, i rewrote it into using a string variable instead of the datasection as it is cleaner and works fine. But the compiler should'nt crash with the other method using a datasection. So it seems like that method triggered a bug?