You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/assign.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,7 @@ SEXP setdt_nrows(SEXP x)
219
219
if (Rf_inherits(xi, "POSIXlt")) {
220
220
error(_("Column %d has class 'POSIXlt'. Please convert it to POSIXct (using as.POSIXct) and run setDT() again. We do not recommend the use of POSIXlt at all because it uses 40 bytes to store one date."), i+1);
221
221
}
222
-
SEXPdim_xi=getAttrib(xi, R_DimSymbol);
222
+
SEXPdim_xi=PROTECT(getAttrib(xi, R_DimSymbol));
223
223
R_len_tlen_xi;
224
224
// NB: LENGTH() produces an undefined large number here on R 3.3.0.
225
225
// There's also a note in NEWS for R 3.1.0 saying length() should always be used by packages,
0 commit comments