Skip to content

Commit 7395eb1

Browse files
committed
copyAsGrowable: don't crash on 0-len argument
1 parent 2dd68e8 commit 7395eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frollapply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ SEXP memcpyDTadaptive(SEXP dest, SEXP src, SEXP offset, SEXP size) {
7676

7777
// needed in adaptive=TRUE
7878
SEXP copyAsGrowable(SEXP x, SEXP by_column) {
79-
if (LOGICAL_RO(by_column)[0])
79+
if (asLogical(by_column))
8080
return R_duplicateAsResizable(x);
8181

8282
SEXP ret = PROTECT(shallow_duplicate(x));

0 commit comments

Comments
 (0)