Skip to content

Commit 534ff33

Browse files
r-suzukis-u
authored andcommitted
Use attribute-name vector length in rniGetAttrNames
1 parent ab58c6a commit 534ff33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/jri/src/Rengine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_rosuda_JRI_Rengine_rniGetAttrNames
436436
jobjectArray sa;
437437
#if (R_VERSION >= R_Version(4,6,0))
438438
SEXP ans = R_getAttribNames(o);
439-
ac = (unsigned int) XLENGTH(o);
439+
ac = (unsigned int) XLENGTH(ans);
440440
if (!ac) return 0;
441441
#else
442442
SEXP att = ATTRIB(o), ah = att;

0 commit comments

Comments
 (0)