Skip to content

Commit

Permalink
add PROTECT for getAttrib rbindlist
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-schwen committed Dec 2, 2024
1 parent 978264b commit 6130c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rbindlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ SEXP rbindlist(SEXP l, SEXP usenamesArg, SEXP fillArg, SEXP idcolArg, SEXP ignor
if (isOrdered(thisCol)) {
orderedFactor = true;
int thisLen = length(getAttrib(thisCol, R_LevelsSymbol));
if (thisLen>longestLen) { longestLen=thisLen; longestLevels=getAttrib(thisCol, R_LevelsSymbol); /*for warnings later ...*/longestW=w; longestI=i; }
if (thisLen>longestLen) { longestLen=thisLen; longestLevels=PROTECT(getAttrib(thisCol, R_LevelsSymbol)); nprotect++; /*for warnings later ...*/longestW=w; longestI=i; }
}
} else if (!isString(thisCol)) anyNotStringOrFactor=true; // even for length 0 columns for consistency; test 2113.3
if (INHERITS(thisCol, char_integer64)) {
Expand Down

0 comments on commit 6130c6c

Please sign in to comment.