Bug in lz4d.pas
Hi, you got bug in lz4d.pas. On line 386, you got: LBytes := lz4s_Decode_Stream_Header( LSD, ASource, LBytes ); It should be: LBytes := lz4s_Decode_Stream_Header(LSD, ASource, ASourceSize);
LBytes is 0 when you call this lz4s_Decode_Stream_Header, therefore you will always get an exception.
Cheers, Ace.
Hi, THX for the report. I will look into it when i have some spare time. Hopefully next week.
Actually LBytes is not initialized, so it has some random value that might be >=7 so the exception will not necessarily occur (it didn't in my tests, I only found this due to a compiler warning). It's a bug nonetheless.
fixed