diff --git a/src/CoreParser.php b/src/CoreParser.php index 6101baf..db08160 100644 --- a/src/CoreParser.php +++ b/src/CoreParser.php @@ -121,7 +121,7 @@ class CoreParser { if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE + 2 ) { $m->type = ord($payload[33]); $m->flags = ord($payload[34]); - $m->out_path = substr($payload, 35, CoreProtocol::MAX_PATH_SIZE); + $m->out_path = self::formatPublicKey(substr($payload, 35, CoreProtocol::MAX_PATH_SIZE)); $m->name = substr($payload, 99, 32); if( strlen($payload) > 204 ) { @@ -332,7 +332,7 @@ class CoreParser { $m->type = ord($payload[33]); $m->flags = ord($payload[34]); $m->out_path_len = ord($payload[35]); - $m->out_path = substr($payload, 36, 64); + $m->out_path = self::formatPublicKey(substr($payload, 36, 64)); $m->name = trim(substr($payload, 100, 32), ' '); $m->last_advert_timestamp = date('r', unpack('V', substr($payload, 132, 4))[1]); $m->lat = unpack('l', substr($payload, 136, 4))[1] / 1000000.0;