name needed null term removal
This commit is contained in:
+2
-2
@@ -122,9 +122,9 @@ class CoreParser {
|
|||||||
$m->type = ord($payload[33]);
|
$m->type = ord($payload[33]);
|
||||||
$m->flags = ord($payload[34]);
|
$m->flags = ord($payload[34]);
|
||||||
$m->out_path = self::formatPublicKey(substr($payload, 35, CoreProtocol::MAX_PATH_SIZE+1));
|
$m->out_path = self::formatPublicKey(substr($payload, 35, CoreProtocol::MAX_PATH_SIZE+1));
|
||||||
$m->name = substr($payload, 100, 32);
|
$m->name = rtrim(substr($payload, 100, 32));
|
||||||
|
|
||||||
if( strlen($payload) > 204 ) {
|
if( strlen($payload) > 133 ) {
|
||||||
$m->last_advert_time = unpack('V', substr($payload, 203, 4))[1];
|
$m->last_advert_time = unpack('V', substr($payload, 203, 4))[1];
|
||||||
$m->lat = unpack('V', substr($payload, 207, 4))[1];
|
$m->lat = unpack('V', substr($payload, 207, 4))[1];
|
||||||
$m->lon = unpack('V', substr($payload, 211, 4))[1];
|
$m->lon = unpack('V', substr($payload, 211, 4))[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user