daqana / tikzDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.

Home Page:https://daqana.github.io/tikzDevice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New WARN on CRAN

rstub opened this issue · comments

Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_tikzDevice.html.

Please correct before 2023-02-11 to safely retain your package on CRAN.

For further details see
https://www.stats.ox.ac.uk/pub/bdr/sprintf.txt

I can reproduce this with rhub::check_with_rdevel(). Problem seems to be here:

sprintf(tikzInfo->outFileName, tikzInfo->originalFileName, tikzInfo->pageNum);

Since tikzInfo->pageNum is an integer, one can use floor(log10(tikzInfo->pageNum)) + 1 to compute its length as a string when replacing sprintf with snprintf.