projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed equivocation between ROD and ROD2 in throw()
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index 5d400db7d5611e5382c7ea7b3bf532759de69714..36deef454c2c332f075c30558f313c8c42fb4aa1 100644
(file)
--- 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));
{
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
sscanf(raw, "%s%s", cmd->raw1, cmd->raw2);
// pack the substrings