Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 General

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 11.08.2007, 17:10   #20
Phantom2005
Архивный участник
 
Join Date: Aug 2005
Posts: 394
Default

I'd personally exchange:
Code:
	$nBytes = strlen($str);
	
	while ($i < $nBytes)
	{
		$i++; 
		$key[$i] = ord(substr($str, $i - 1, 1)); 
		$dst[$i] = $key[$i];
	}
for
Code:
	while ($i < 16) {
		$i++;
		$key[$i] = '';
		$dst[$i] = '';
		$key[$i] = ord(substr($str, $i - 1, 1));
		$dst[$i] = $key[$i];
	}
A password can not be bigger then 16 chars. ( quote l2cp: if(strlen($password) < 4 || strlen($password) > 16) { )
If you don't do this there will be $key's that will remain "undefined".
If you have error_reporting on E_ALL you will have a few warnings.
If you exchange that part with my code those warnings will be gone + will work fine.
Phantom2005 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:50.