LocalIP: support --localip-name-prefix on Windows

This commit is contained in:
李通洲
2022-10-16 01:34:26 +08:00
parent a090bed6c0
commit a829e85ef5
2 changed files with 13 additions and 19 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ void ffPrintLocalIp(FFinstance* instance)
if(instance->config.localIP.key.length == 0)
{
ffStrbufSetF(&key, FF_LOCALIP_MODULE_NAME " (%*s)", ip->name.length, ip->name.chars);
if(ip->name.length)
ffStrbufSetF(&key, FF_LOCALIP_MODULE_NAME " (%*s)", ip->name.length, ip->name.chars);
else
ffStrbufSetS(&key, FF_LOCALIP_MODULE_NAME);
}
else
{