diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-05-17 19:40:01 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-05-17 19:40:01 +0000 |
commit | 75fa924529cdfcbffc90b3c59bb4df042564c684 (patch) | |
tree | 9ec5d1a3996f85d9898066e955670dfdeae4fc84 | |
parent | 22578e7a7d090426f0f56486023c2614bd0d6248 (diff) | |
download | ioquake3-aero-75fa924529cdfcbffc90b3c59bb4df042564c684.tar.gz ioquake3-aero-75fa924529cdfcbffc90b3c59bb4df042564c684.zip |
Adding a bit of commentary to the code.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1085 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r-- | code/botlib/be_ai_chat.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c index 7df59e9..7e560da 100644 --- a/code/botlib/be_ai_chat.c +++ b/code/botlib/be_ai_chat.c @@ -376,7 +376,17 @@ int BotNextConsoleMessage(int chatstate, bot_consolemessage_t *cm) cm->handle = firstmsg->handle; cm->time = firstmsg->time; cm->type = firstmsg->type; - Q_strncpyz(cm->message, firstmsg->message, sizeof(cm->message)); + Q_strncpyz(cm->message, firstmsg->message, + sizeof(cm->message)); + + /* We omit setting the two pointers in cm because pointer + * size in the VM differs between the size in the engine on + * 64 bit machines, which would lead to a buffer overflow if + * this functions is called from the VM. The pointers are + * of no interest to functions calling + * BotNextConsoleMessage anyways. + */ + return cm->handle; } //end if return 0; |