aboutsummaryrefslogtreecommitdiffstats
path: root/ui/recent.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/recent.c')
-rw-r--r--ui/recent.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/recent.c b/ui/recent.c
index 93e15715df..35ec2785f6 100644
--- a/ui/recent.c
+++ b/ui/recent.c
@@ -490,7 +490,12 @@ capture_remote_combo_add_recent(const gchar *s)
if (valp) {
/* Found value 2, this is the port number */
- rh->remote_port = (gchar *)g_strdup ((const gchar *)valp->data);
+ if (!strcmp((const char*)valp->data, "0")) {
+ /* Port 0 isn't valid, so leave port blank */
+ rh->remote_port = (gchar *)g_strdup ("");
+ } else {
+ rh->remote_port = (gchar *)g_strdup ((const gchar *)valp->data);
+ }
valp = valp->next;
} else {
/* Did not find a port number */