X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=misc.c;h=36deef454c2c332f075c30558f313c8c42fb4aa1;hp=5d400db7d5611e5382c7ea7b3bf532759de69714;hb=5ae09b9c34dda539a0b197248e22c733e00dcffd;hpb=babf08ddc426a0466517f1c750db12321de749d1 diff --git a/misc.c b/misc.c index 5d400db..36deef4 100644 --- a/misc.c +++ b/misc.c @@ -94,7 +94,9 @@ void tokenize(char* raw, struct command_t *cmd) { memset(cmd, '\0', sizeof(struct command_t)); - /* FIXME: put a bound prefix on the %s to prevent buffer overflow */ + /* Bound prefix on the %s would be needed to prevent buffer + * overflow. but we shortstop this more simply by making each + * raw-input buffer as long as the enrire inout buffer. */ sscanf(raw, "%s%s", cmd->raw1, cmd->raw2); // pack the substrings