Skip to content

Commit

Permalink
Fix malloc warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 5, 2022
1 parent dcb4661 commit e43a8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collapse_pretty.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ SEXP C_collapse_array_pretty_inner(SEXP x) {
error("x must character vector.");

//calculate required space
int len = length(x);
size_t len = Rf_length(x);
size_t nchar_total = 0;
for (int i=0; i<len; i++) {
nchar_total += strlen(translateCharUTF8(STRING_ELT(x, i)));
Expand Down

0 comments on commit e43a8f6

Please sign in to comment.