summaryrefslogtreecommitdiff
path: root/source3/aparser/templates/prs_array_remainder.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'source3/aparser/templates/prs_array_remainder.tpl')
-rw-r--r--source3/aparser/templates/prs_array_remainder.tpl10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/aparser/templates/prs_array_remainder.tpl b/source3/aparser/templates/prs_array_remainder.tpl
index 80c5d8b9af..c8b1e2ab5a 100644
--- a/source3/aparser/templates/prs_array_remainder.tpl
+++ b/source3/aparser/templates/prs_array_remainder.tpl
@@ -1,3 +1,4 @@
+ if (UNMARSHALLING(ps))
{
int i;
for (i=0;ps->data_offset < ps->buffer_size;i++) {
@@ -5,3 +6,12 @@
if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
}
}
+ else
+ {
+ int i = -1;
+ /* HACK ALERT! */
+ do {
+ i++;
+ if (!io_@TYPE@("@ELEM@...", ps, depth+1, &il->@ELEM@[i], @FLAGS@)) goto fail;
+ } while (il->@ELEM@[i].tag2 != 0);
+ }