diff --git a/svr-runopts.c b/svr-runopts.c
index c6e3508202b7cd725e4eb75de167cbc629630d59..2e5edc53c5ea850ccf79dae6dd955aaba54749a8 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -325,7 +325,7 @@ static void addportandaddress(char* spec) {
 		myspec = m_strdup(spec);
 
 		/* search for ':', that separates address and port */
-		svr_opts.ports[svr_opts.portcount] = strchr(myspec, ':');
+		svr_opts.ports[svr_opts.portcount] = strrchr(myspec, ':');
 
 		if (svr_opts.ports[svr_opts.portcount] == NULL) {
 			/* no ':' -> the whole string specifies just a port */