Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding a FAQ entry on the CVS compiling.
[simgrid.git] / src / xbt / xbt_host.c
index 88eb6ea..d9c30e3 100644 (file)
@@ -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 <hostname>:<port>, it's '%s'", hostport);
    *port_str='\0';
    port_str++;