name needed null term removal

This commit is contained in:
Ben Menking
2026-05-30 16:23:47 -04:00
parent d1cc84c001
commit 04057d06bc
+2 -2
View File
@@ -122,9 +122,9 @@ class CoreParser {
$m->type = ord($payload[33]);
$m->flags = ord($payload[34]);
$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->lat = unpack('V', substr($payload, 207, 4))[1];
$m->lon = unpack('V', substr($payload, 211, 4))[1];