(TChoice): add () to make sure variable expression is evaluated correctly

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15646 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-13 10:40:23 +00:00
parent 85342c54c4
commit ab69af8c30
2 changed files with 5 additions and 5 deletions

View File

@@ -411,11 +411,11 @@ encode_type (const char *name, const Type *t)
if (have_ellipsis) {
fprintf(codefile,
"case %s: {\n"
"if (len < %s->u.%s.length)\n"
"if (len < (%s)->u.%s.length)\n"
"return ASN1_OVERFLOW;\n"
"p -= %s->u.%s.length;\n"
"ret += %s->u.%s.length;\n"
"memcpy(p + 1, %s->u.%s.data, %s->u.%s.length);\n"
"p -= (%s)->u.%s.length;\n"
"ret += (%s)->u.%s.length;\n"
"memcpy(p + 1, (%s)->u.%s.data, (%s)->u.%s.length);\n"
"break;\n"
"}\n",
have_ellipsis->label,