Fix regression in passing strings as parameters

This commit is contained in:
Sam Ruby 2000-07-22 18:09:28 +00:00
parent d69d04cf75
commit 668af98d75
2 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ static jobject _java_makeObject(pval* arg JG_DC) {
switch (arg->type) {
case IS_STRING:
result=(*jenv)->NewByteArray(jenv,arg->value.str.len);
(*jenv)->SetByteArrayRegion(jenv,(jbyteArray)arg,0,
(*jenv)->SetByteArrayRegion(jenv,(jbyteArray)result,0,
arg->value.str.len, arg->value.str.val);
break;

View File

@ -287,7 +287,7 @@ static jobject _java_makeObject(pval* arg JG_DC) {
switch (arg->type) {
case IS_STRING:
result=(*jenv)->NewByteArray(jenv,arg->value.str.len);
(*jenv)->SetByteArrayRegion(jenv,(jbyteArray)arg,0,
(*jenv)->SetByteArrayRegion(jenv,(jbyteArray)result,0,
arg->value.str.len, arg->value.str.val);
break;