Skip to content

Commit e43a8f6

Browse files
committed
Fix malloc warning
1 parent dcb4661 commit e43a8f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/collapse_pretty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ SEXP C_collapse_array_pretty_inner(SEXP x) {
8181
error("x must character vector.");
8282

8383
//calculate required space
84-
int len = length(x);
84+
size_t len = Rf_length(x);
8585
size_t nchar_total = 0;
8686
for (int i=0; i<len; i++) {
8787
nchar_total += strlen(translateCharUTF8(STRING_ELT(x, i)));

0 commit comments

Comments
 (0)