PureBasic Forum

Bug or my mistake?
Page 1 of 1

Author:  Bitblazer [ Sat Apr 06, 2019 2:58 pm ]
Post subject:  Bug or my mistake?

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?


The tool encoded and created smaller files successfully.

Thanks in advance and have a happy weekend :)

Author:  RASHAD [ Sat Apr 06, 2019 3:34 pm ]
Post subject:  Re: Bug or my mistake?

Your problem with DataSection
Use instead :
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)

Author:  Bitblazer [ Sat Apr 06, 2019 4:36 pm ]
Post subject:  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?

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group