summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-01 12:39:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:57 -0500
commitf536c4a608bc8de3a9a0fd73f4c75f3183caa547 (patch)
treed05c2c40bbc1705517e4edc82322e5c22e1e5364 /source4/pidl/lib/Parse
parent28918cd0b0a091407f6e5be8396b363ffab87966 (diff)
downloadsamba-f536c4a608bc8de3a9a0fd73f4c75f3183caa547.tar.gz
samba-f536c4a608bc8de3a9a0fd73f4c75f3183caa547.tar.bz2
samba-f536c4a608bc8de3a9a0fd73f4c75f3183caa547.zip
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)
Diffstat (limited to 'source4/pidl/lib/Parse')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm5
1 files changed, 3 insertions, 2 deletions
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;