mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 10:40:12 +00:00
fixed gettext to return correct string, and use a null character at the end.
This commit is contained in:
parent
7666f663a2
commit
cb813e93f9
@ -348,16 +348,19 @@ char *str;
|
||||
thetext = WEGetText(mTE_Data);
|
||||
len = WEGetTextLength(mTE_Data);
|
||||
|
||||
HLock(thetext);
|
||||
str = new char[len];
|
||||
//HLock(thetext);
|
||||
str = new char[len+1];
|
||||
|
||||
for(i=0;i<len;i++)
|
||||
str[i] = (*thetext)[i];
|
||||
HUnlock(thetext);
|
||||
str[len] = 0;
|
||||
//HUnlock(thetext);
|
||||
|
||||
aTextBuffer.SetLength(0);
|
||||
aTextBuffer.Append(str);
|
||||
delete str;
|
||||
aSize = aTextBuffer.Length();
|
||||
|
||||
delete [] str;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user