From: mquinson Date: Fri, 19 May 2006 09:44:14 +0000 (+0000) Subject: And now, this damn 5-lines function without trivial bug. :( Sorry for the spam X-Git-Tag: v3.3~3108 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/26860eef5251a64ec0441bd4c2e0181515d577b2?hp=422e163d2e62fd17bddf676642db97c099d2ac36 And now, this damn 5-lines function without trivial bug. :( Sorry for the spam git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2250 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/xbt_host.c b/src/xbt/xbt_host.c index 88eb6eab17..d9c30e3770 100644 --- a/src/xbt/xbt_host.c +++ b/src/xbt/xbt_host.c @@ -25,7 +25,7 @@ xbt_host_t xbt_host_new(const char *name, int port) { xbt_host_t xbt_host_from_string(const char *hostport) { xbt_host_t res=xbt_new(s_xbt_host_t, 1); char *name=xbt_strdup(hostport); - char *port_str=strchr(hostport,':'); + char *port_str=strchr(name,':'); xbt_assert1(port_str,"argument of xbt_host_from_string should be of form :, it's '%s'", hostport); *port_str='\0'; port_str++;