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 »

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: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ByteChr with Nullbyte gives empty string

Post by airsoftsoftwair »

Right, that's clearly a bug. Will be fixed. Btw, please use [code]....[/code] when pasting code :)
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ByteChr with Nullbyte gives empty string

Post by airsoftsoftwair »

Code: Select all

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