[8744] Fix 'warning: deleting ‘void*’ is undefined' in SqlOperations.h/SqlOperations.cpp, caused by [8736]. Thanks to Shendor for pointing the problem.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2009-10-27 11:41:53 +02:00
parent a4e3b3e6aa
commit 190c5e6338
4 changed files with 10 additions and 13 deletions

View file

@ -187,10 +187,7 @@ LocaleConstant GetLocaleByName(const std::string& name);
//operator new[] based version of strdup() function! Release memory by using operator delete[] !
inline char * mangos_strdup(const char * source)
{
const size_t length = strlen(source);
char * dest = new char[length + 1];
//set terminating end-of-string symbol
dest[length] = 0;
char * dest = new char[strlen(source) + 1];
strcpy(dest, source);
return dest;
}