ByteChr with Nullbyte gives empty string

Report any Hollywood bugs here
Post Reply
DieterG
Posts: 20
Joined: Tue Oct 23, 2018 9:40 pm

ByteChr with Nullbyte gives empty string

Post by DieterG » Tue Oct 23, 2018 10:56 pm

ByteChr gives an empty string if the input a Nullbyte.
It is nessary on RAWdatas to not ignore a nullbyte.

I must use a little trick to solve the Problem, but is easier to see the problem:

temp$ = MidStr(received$,i,1)
Null$ = „/0“
j=Val(temp$)
If j=0
out$=out$ .. Null$
Else
out$ = out$ .. ByteChr(j)
EndIf
Dieter

User avatar
airsoftsoftwair
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ByteChr with Nullbyte gives empty string

Post by airsoftsoftwair » Fri Oct 26, 2018 11:08 pm

Right, that's clearly a bug. Will be fixed. Btw, please use [code]....[/code] when pasting code :)

User avatar
airsoftsoftwair
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ByteChr with Nullbyte gives empty string

Post by airsoftsoftwair » Sat Dec 01, 2018 3:38 pm

Code: Select all

- Fix: ByteChr() returned an empty string when passing 0

Post Reply