host: Don't log port if it is zero

This commit is contained in:
Tobias Brunner
2017-03-02 08:27:30 +01:00
parent d8e12fdb13
commit 2283c8148a
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ int host_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
snprintf(buffer, sizeof(buffer),
"(address conversion failed)");
}
else if (spec->hash)
else if (spec->hash && port)
{
len = strlen(buffer);
snprintf(buffer + len, sizeof(buffer) - len,