aboutsummaryrefslogtreecommitdiffstats
path: root/code/botlib
diff options
context:
space:
mode:
Diffstat (limited to 'code/botlib')
-rw-r--r--code/botlib/be_ai_chat.c12
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;