honor known-extern-type
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@897 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1fix/asn1fix_value.c b/libasn1fix/asn1fix_value.c
index 6025942..50d8da2 100644
--- a/libasn1fix/asn1fix_value.c
+++ b/libasn1fix/asn1fix_value.c
@@ -27,11 +27,16 @@
* 1. Find the terminal type for this assignment.
*/
type_expr = asn1f_find_terminal_type(arg, expr);
- DEBUG("terminal type %p", type_expr);
if(type_expr == 0) {
- FATAL("Terminal type for %s at line %d not found",
- expr->Identifier, expr->_lineno);
- return -1;
+ if(errno == EEXIST) {
+ DEBUG("External type for %s at line %d",
+ expr->Identifier, expr->_lineno);
+ return 0;
+ } else {
+ FATAL("Terminal type for %s at line %d not found",
+ expr->Identifier, expr->_lineno);
+ return -1;
+ }
}
if(asn1f_look_value_in_type(arg, type_expr, expr) == -1) {