Log Message:
-----------
Fix for sending NULLs to ChatOut
Modified Files:
--------------
/cvsroot/decaldev/source/Decal:
ACHooks.cpp
Revision Data
-------------
Index: ACHooks.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- ACHooks.cpp 13 Sep 2003 02:33:02 -0000 1.66
+++ ACHooks.cpp 8 Oct 2003 20:56:10 -0000 1.67
@@ -948,6 +948,9 @@
// Will implement IKitchenSink later
void InternalRawWriteToChat( char* pText, long lColor, int chatMessageArg1, int chatMessageArg2 )
{
+ if( pText == NULL )
+ return;
+
if( g_bTimestamp )
{
bool bDoTimeStamp = (g_charBufferPreviousCall == '\n') ? true : false;
@@ -1027,7 +1030,6 @@
return;
}
-/* Heyus - 23 Mar 2003 - Fixed to point to the new universal function */
STDMETHODIMP cACHooks::ChatOut(BSTR szText, long lColor)
{
if( pfnOldChatMessage == NULL )
@@ -1040,6 +1042,10 @@
USES_CONVERSION;
char *strText = OLE2A( szText );
+
+ if( strText == NULL )
+ return S_FALSE;
+
int iStrLen = strlen( strText );
int iOffset = 0;
|