mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 06:07:34 +02:00
defWrite.: '%.10g' directive writing between 1 and 17 bytes into a region of size 12
GCC14 loud default warnings series [-Wformat-overflow=]
This commit is contained in:
committed by
Tim Edwards
parent
9f88450243
commit
6a08b31149
+2
-2
@@ -531,7 +531,7 @@ defWriteRouteWidth(defdata, width)
|
||||
int width;
|
||||
{
|
||||
float oscale = defdata->scale;
|
||||
char numstr[12];
|
||||
char numstr[32];
|
||||
sprintf(numstr, "%.10g", ((float)width * defdata->scale));
|
||||
defCheckForBreak(strlen(numstr) + 1, defdata);
|
||||
fprintf(defdata->f, "%s ", numstr);
|
||||
@@ -564,7 +564,7 @@ defWriteCoord(defdata, x, y, orient)
|
||||
unsigned char orient;
|
||||
{
|
||||
FILE *f = defdata->f;
|
||||
char numstr[12];
|
||||
char numstr[32];
|
||||
int ctot = 4;
|
||||
|
||||
/* The "12" here is just a fudge factor; it is not crucial */
|
||||
|
||||
Reference in New Issue
Block a user