Frontport r9650
"Add a error message about not being able to (re)allocate a string" git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9706 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
a6d88bda6b
commit
6a083086e2
|
@ -160,7 +160,10 @@ static void insertChar(utf_32_char **pBuffer, size_t *pBufferAllocated, UDWORD *
|
|||
/* Buffer is full */
|
||||
utf_32_char *newBuffer = realloc(*pBuffer, *pBufferAllocated*2);
|
||||
if (!newBuffer)
|
||||
{
|
||||
debug(LOG_ERROR, "Couldn't realloc() string?");
|
||||
return;
|
||||
}
|
||||
*pBuffer = newBuffer;
|
||||
*pBufferAllocated *= 2;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue