From 2c5e70b1c90d7d87edbca1ddcbb84ed232b01665 Mon Sep 17 00:00:00 2001 From: Areloch Date: Sun, 14 May 2017 17:51:13 -0500 Subject: [PATCH 1/2] Console Classes dump fix. It was running aground on having a case where there was a empty value for the 'usage' field in the class header. This would break the allocation because we're allocating nothing. This rejects it if the usage field is an empty string. --- Engine/source/console/consoleDoc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/console/consoleDoc.cpp b/Engine/source/console/consoleDoc.cpp index b442841a4..a3f18a4bc 100644 --- a/Engine/source/console/consoleDoc.cpp +++ b/Engine/source/console/consoleDoc.cpp @@ -85,7 +85,7 @@ void printClassHeader(const char* usage, const char * className, const char * su Con::printf("/// information was available for this class."); } - if( usage != NULL ) + if( usage != NULL && usage != "") { // Copy Usage Document S32 usageLen = dStrlen( usage ); From c0f314101d340141234c17c38f1524612e75080e Mon Sep 17 00:00:00 2001 From: Areloch Date: Wed, 31 May 2017 02:27:28 -0500 Subject: [PATCH 2/2] Use the more stable method of checking the string by using the strlen call. --- Engine/source/console/consoleDoc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/console/consoleDoc.cpp b/Engine/source/console/consoleDoc.cpp index a3f18a4bc..b63d7293a 100644 --- a/Engine/source/console/consoleDoc.cpp +++ b/Engine/source/console/consoleDoc.cpp @@ -85,7 +85,7 @@ void printClassHeader(const char* usage, const char * className, const char * su Con::printf("/// information was available for this class."); } - if( usage != NULL && usage != "") + if((usage != NULL) && strlen(usage)) { // Copy Usage Document S32 usageLen = dStrlen( usage );