8021943: FileDialog getFile returns corrupted string after previous setFile
Reviewed-by: anthony, serb
This commit is contained in:
parent
22039ebd3e
commit
1530a30f52
@ -372,7 +372,9 @@ AwtFileDialog::Show(void *p)
|
||||
|
||||
// Report result to peer.
|
||||
if (result) {
|
||||
jint length = (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile);
|
||||
jint length = multipleMode
|
||||
? (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile)
|
||||
: (jint)_tcslen(ofn.lpstrFile);
|
||||
jcharArray jnames = env->NewCharArray(length);
|
||||
env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user