From c22ae5ed4ca8d7e5568be7d5a930ee388117703e Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 7 May 2022 17:55:25 +0200 Subject: [PATCH] issue #9319 Doc build fails with cairo 1.17.6 The `\MediaBox` field is written as: ``` sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height) ``` bur read with ``` sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height) ``` this has been corrected. --- src/dotrunner.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp index 04eb452fc1a..858b2a85869 100644 --- a/src/dotrunner.cpp +++ b/src/dotrunner.cpp @@ -123,12 +123,15 @@ bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height, if (p) // found PageBoundingBox or /MediaBox string { int x,y; + double w,h; fclose(f); - if (sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height)!=4) + if (sscanf(p+bblen,"%d %d %lf %lf",&x,&y,&w,&h)!=4) { //printf("readBoundingBox sscanf fail\n"); return FALSE; } + *width = static_cast(ceil(w)); + *height = static_cast(ceil(h)); return TRUE; } }