Closed kntroh closed 12 years ago
This is code at Menu.java (of SWT):
TCHAR buffer = new TCHAR (0, " ", true); int byteCount = buffer.length () * TCHAR.sizeof;
If TCHAR class constructed by terminate = true, it will make space of '\0'. Therefore, buffer.length() is 2.
terminate = true
StringT buffer = StrToTCHARs (0, " \0"); int byteCount = (buffer.length-1) * TCHAR.sizeof;
buffer.length-1 of this code must be buffer.length. (buffer.length is 2)
buffer.length-1
buffer.length
An error occur occasionally in an environment of low on memory.
This is code at Menu.java (of SWT):
If TCHAR class constructed by
terminate = true
, it will make space of '\0'. Therefore, buffer.length() is 2.buffer.length-1
of this code must bebuffer.length
. (buffer.length is 2)An error occur occasionally in an environment of low on memory.