gnetlist silently drops components
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gEDA |
Fix Released
|
Undecided
|
Patrick Bernaud |
Bug Description
gnetlist drops components without a trace or warning if the component has a valueless attribute.
I am running from git
commit c59ea5789e57df8
Date: Fri Jan 25 14:28:38 2013 +0100
The following change fixes the problem:
diff --git a/libgeda/
index 5dae202..cb161a1 100644
--- a/libgeda/
+++ b/libgeda/
@@ -383,7 +383,7 @@ o_attrib_
prev_char = g_utf8_
next_char = g_utf8_
if (prev_char == NULL || *prev_char == ' ' ||
- next_char == NULL || *next_char == ' ' || *next_char == '\0' ) {
+ next_char == NULL || *next_char == ' ' ) {
return FALSE;
}
The patch allows invalid valueless attributes as produced by gattrib to be processed without unexpected surprises.
This patch has not been extensively tested.
Changed in geda: | |
assignee: | nobody → Patrick Bernaud (patrickb) |
status: | New → In Progress |
Changed in geda: | |
milestone: | none → 1.9.1 |
Changed in geda: | |
status: | Fix Committed → Fix Released |
libgeda's 'get-attrib- value-by- attrib' used to be resilient to invalid attributes but its reimplementation in Scheme (a3433b6a4c088b 8926f8768e20eff 18d0dafea4b) is instead choking on it.
The attached patch is catching and ignoring the 'attribute-format' exception that is thrown by 'parse-attrib'.