Skip to content

Commit 5908af3

Browse files
committed
Restore %td format specifiers
DTPRINT is Rprintf, so goes through R's built-in copy of 'trio', so C99 specifiers are fine to use here. On the other hand, 'long' is only 32 bits in size even on 64-bit Windows and so is unsafe to use for sizes.
1 parent c4ea09e commit 5908af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,8 +1919,8 @@ int freadMain(freadMainArgs _args) {
19191919
} else if (jump0size==0) {
19201920
DTPRINT(_(" Number of sampling jump points = %d because jump0size==0\n"), nJumps);
19211921
} else {
1922-
DTPRINT(_(" Number of sampling jump points = %d because (%ld bytes from row 1 to eof) / (2 * %ld jump0size) == %ld\n"),
1923-
nJumps, (long int)sz, (long int)jump0size, (long int)(sz/(2*jump0size)));
1922+
DTPRINT(_(" Number of sampling jump points = %d because (%td bytes from row 1 to eof) / (2 * %td jump0size) == %td\n"),
1923+
nJumps, sz, jump0size, sz/(2*jump0size));
19241924
}
19251925
}
19261926
nJumps++; // the extra sample at the very end (up to eof) is sampled and format checked but not jumped to when reading

0 commit comments

Comments
 (0)