(svn r15123) -Fix [NoAI]: 'const char *' implies that the return value should not be free'd, which is should .. so make them 'char *'
This commit is contained in:
@@ -14,9 +14,9 @@ AIError::AIErrorMapString AIError::error_map_string = AIError::AIErrorMapString(
|
||||
return AIObject::GetLastError();
|
||||
}
|
||||
|
||||
/* static */ const char *AIError::GetLastErrorString()
|
||||
/* static */ char *AIError::GetLastErrorString()
|
||||
{
|
||||
return (*error_map_string.find(AIError::GetLastError())).second;
|
||||
return strdup((*error_map_string.find(AIError::GetLastError())).second);
|
||||
}
|
||||
|
||||
/* static */ AIErrorType AIError::StringToError(StringID internal_string_id)
|
||||
|
Reference in New Issue
Block a user