File 184.patch of Package transfig.38710
Based on ff9aba206a30288f456dfc91584a52ba9927b438 Mon Sep 17 00:00:00 2001
From: Thomas Loimer <thomas.loimer@tuwien.ac.at>
Date: Tue, 21 Jan 2025 20:50:15 +0100
Subject: [PATCH] Allow an arc-box with zero radius, ticket #184
In the pict2e output, a rectangle with rounded corners,
dashed line type and zero corner-radius would cause a crash.
Convert rectangles with rounded corners and zero corner-radius to
regular rectangles.
---
fig2dev/read.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- fig2dev/read.c
+++ fig2dev/read.c 2025-05-08 16:32:47.417897443 +0200
@@ -989,6 +989,14 @@ sanitize_lineobject(
obj_name[l->type-2], line_no);
return -1;
}
+ if (l->type == T_ARC_BOX && l->radius == 0) {
+ put_msg("A %s, but zero corner radius "
+ "at line %d - convert "
+ "to a rectangle.",
+ obj_name[l->type - 2], line_no);
+ l->type = T_BOX;
+
+ }
}
}