Page 1 of 1 1
Topic Options
#124102 - 2004-07-29 01:21 PM kixtart accepts char(0)!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
wow.
was playing with my newist golf score and realized:
$somevalue=777
$text=join(split($text,chr($somevalue-$somevalue)),'')

goes screwed pretty bad
_________________________
!

download KiXnet

Top
#124103 - 2004-07-29 01:44 PM Re: kixtart accepts char(0)!
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
lol,

Quote:

kixtart accepts char(0)!




and

Quote:

goes screwed pretty bad




is quite contradictory, isn't it ?
_________________________



Top
#124104 - 2004-07-29 01:57 PM Re: kixtart accepts char(0)!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, yes and no.

if you shoot other string manipulators with invalid input, you get nothing back.
when you split with chr(0) it returns some part of the text...
that's the problem, it somehow accepts it but translates it wrong.
instead of giving the very end of string (thus block 0 is full string and 1 nothing) it gives part of the string back when compained with join.
but it cuts the string somehow in the middle.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2419 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.059 seconds in which 0.034 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org