commit eb87a9b6c7fcebe5ec7778b5ff51fc453f5fa74d
parent 86591d393a136742f5e4683aa642ef99f7b76ac7
Author: Tomas Hlavaty <tom@logand.com>
Date: Sat, 14 Apr 2012 23:45:24 +0200
fix seq0 in combination with recursive sequence
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/unoidl2java.c b/unoidl2java.c
@@ -790,7 +790,10 @@ static Any pp(Any x) {
case ABSOLUTE: pr_absolute(x); break;
case CONSTANTS: pr_constants(x); break;
case CONST: pr_const(x); break;
- case SEQUENCE: pp(cadr(x)); pr(seq0 ? "[0]" : "[]"); break;
+ case SEQUENCE:
+ pp(cadr(x));
+ pr(0 < seq0 && SEQUENCE != kind(car(cadr(x))) ? "[0]" : "[]");
+ break;
case ATTRIBUTE: pr_attribute(x); break;
case EXCEPTION: pr_exception(x); break;
case SERVICE: pr_service(x); break;