r1085 - trunk/code/botlib

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu May 17 15:40:01 EDT 2007


Author: thilo
Date: 2007-05-17 15:40:01 -0400 (Thu, 17 May 2007)
New Revision: 1085

Modified:
   trunk/code/botlib/be_ai_chat.c
Log:
Adding a bit of commentary to the code.


Modified: trunk/code/botlib/be_ai_chat.c
===================================================================
--- trunk/code/botlib/be_ai_chat.c	2007-05-17 19:30:02 UTC (rev 1084)
+++ trunk/code/botlib/be_ai_chat.c	2007-05-17 19:40:01 UTC (rev 1085)
@@ -376,7 +376,17 @@
 		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;




More information about the quake3-commits mailing list