From f536c4a608bc8de3a9a0fd73f4c75f3183caa547 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 1 Dec 2005 12:39:33 +0000 Subject: r11997: for multidimentional array like this: uint32 [num_level2][num_level1][num_level0] fix the order they're pushed and pulled, it should be like this for (l2=0; l2 < num_level2; l2++) { for (l1=0; l1 < num_level1; l1++) { for (l0=0; l0 < num_level0; l0++) { ndr_pull_uint32(...); } } } metze (This used to be commit c10195f31383f51911edd8a32f8b5d5857d5bf2d) --- source4/pidl/lib/Parse/Pidl/NDR.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/pidl') diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 882ebeccb5..9ff69f8757 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -104,9 +104,10 @@ sub GetElementLevelTable($) if (defined($e->{ARRAY_LEN})) { @bracket_array = @{$e->{ARRAY_LEN}}; } - + # Parse the [][][][] style array stuff - foreach my $d (@bracket_array) { + for my $i (0 .. $#bracket_array) { + my $d = $bracket_array[$#bracket_array - $i]; my $size = $d; my $length = $d; my $is_surrounding = 0; -- cgit