2819445 SafeArray.fromLongArray fails when using VariantLongInt

This commit is contained in:
clay_shooter
2009-12-25 19:11:55 +00:00
parent 54f105525b
commit d639d9fd76
3 changed files with 6 additions and 1 deletions

View File

@@ -483,7 +483,8 @@ JNIEXPORT void JNICALL Java_com_jacob_com_SafeArray_fromLongArray
} else if (vt == VT_I8) {
void *pData;
SafeArrayAccessData(psa, &pData);
memcpy(pData, arrayElements, len*sizeof(long));
// VT_I8 is actually a LONGLONG and not a long in length SF 2819445
memcpy(pData, arrayElements, len*sizeof(LONGLONG));
SafeArrayUnaccessData(psa);
} else {
ThrowComFail(env, "safearray cannot be assigned from long", -1);