diff --git a/mbcico/scanout.c b/mbcico/scanout.c index 3dc26338..b6a3faa0 100644 --- a/mbcico/scanout.c +++ b/mbcico/scanout.c @@ -81,7 +81,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2); if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) { - sscanf(de->d_name,"%04x%04x",&t_net,&t_node); + sscanf(de->d_name,"%04hx%04hx",&t_net,&t_node); addr.net = t_net; addr.node = t_node; if ((rc = scan_dir(fn, fname, 1))) @@ -103,10 +103,10 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo (strcasecmp(de->d_name+8,".req") == 0) || (strcasecmp(de->d_name+8,".pol") == 0)) { if (ispoint) { - sscanf(de->d_name,"%08x", &t_point); + sscanf(de->d_name,"%08hx", &t_point); addr.point = t_point; } else { - sscanf(de->d_name,"%04x%04x", &t_net,&t_node); + sscanf(de->d_name,"%04hx%04hx", &t_net,&t_node); addr.net = t_net; addr.node = t_node; }