Skip to content

Commit 00b1d6b

Browse files
actually need to use abs because R is not consistent internally
1 parent c7bc8bf commit 00b1d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/include/Rcpp/DataFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace Rcpp{
7979
if (Rf_isNull(rn))
8080
return 0;
8181
if (TYPEOF(rn) == INTSXP && LENGTH(rn) == 2 && INTEGER(rn)[0] == NA_INTEGER)
82-
return -INTEGER(rn)[1];
82+
return abs(INTEGER(rn)[1]);
8383
return LENGTH(rn);
8484
}
8585

0 commit comments

Comments
 (0)