Skip to content

Commit a52257a

Browse files
committed
bug-fix: integer overflow in onc * onr
1 parent 4c5ea70 commit a52257a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/print_methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ but they do not completely overlap.")
244244
onr <- nr <- nrow(x)
245245
onc <- nc <- ncol(x)
246246

247-
if (n >= onc*onr) {
247+
if ( onc > 0 && onr > 0 && n / onc >= onr ) {
248248
n <- onc*onr
249249
separator_row_flag = FALSE
250250
}else{

0 commit comments

Comments
 (0)