Make the result a proper const char *.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36313 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
362b036d1a
commit
8c4c164a91
@ -175,7 +175,7 @@ TextGapBuffer::SizeGapTo(long inCount)
|
||||
const char *
|
||||
TextGapBuffer::GetString(int32 fromOffset, int32 *_numBytes)
|
||||
{
|
||||
char *result = (char *)"";
|
||||
const char *result = "";
|
||||
if (_numBytes == NULL)
|
||||
return result;
|
||||
|
||||
@ -216,7 +216,7 @@ TextGapBuffer::GetString(int32 fromOffset, int32 *_numBytes)
|
||||
}
|
||||
result = fScratchBuffer;
|
||||
|
||||
char *scratchPtr = result;
|
||||
char *scratchPtr = fScratchBuffer;
|
||||
for (uint32 i = 0; i < numChars; i++) {
|
||||
memcpy(scratchPtr, B_UTF8_BULLET, charLen);
|
||||
scratchPtr += charLen;
|
||||
|
Loading…
Reference in New Issue
Block a user