Skip to content

Commit

Permalink
issue #9319 Doc build fails with cairo 1.17.6
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
albert-github committed May 7, 2022
1 parent dc953d3 commit c22ae5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dotrunner.cpp
Expand Up @@ -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<int>(ceil(w));
*height = static_cast<int>(ceil(h));
return TRUE;
}
}
Expand Down

0 comments on commit c22ae5e

Please sign in to comment.