if (x < 0 || *str++ != ',')
return 0;
y = strtoy(str, &str);
- if (y < 0 || *str != 0)
- return 0;
+ if (y < 0 || (*str != 0 && !isspace(*str)))
+ return 0;
if ((x ^ y) & 1)
return 0;
np = getnatp(player->cnum);
*/
if (*++str) {
rlm = strtol(str, &end, 10);
- if (end == str || *end != 0 || rlm < 0 || MAXNOR <= rlm)
+ if (end == str || (*end != 0 && !isspace(*end))
+ || rlm < 0 || MAXNOR <= rlm)
return 0;
} else
rlm = 0;
if (rp->hy < 0)
return 0;
}
- if (*str != 0)
+ if (*str != 0 && !isspace(*str))
return 0;
np = getnatp(player->cnum);
rp->lx = xabs(np, rp->lx);
if (y < 0 || *str++ != ':')
return 0;
d = strtol(str, &end, 10);
- if (end == str || d < 0 || *end != 0)
+ if (end == str || (*end != 0 && !isspace(*end)) || d < 0)
return 0;
*dist = d;
np = getnatp(player->cnum);
str = end;
} while (*str++ == '/');
- if (str[-1] != 0) {
+ if (str[-1] != 0 && !isspace(str[-1])) {
pr("Expecting '/', got '%c'\n", str[-1]);
return 0;
}