From ff02b7a4618eeac33fb744e9abe3ce4527bb4113 Mon Sep 17 00:00:00 2001 From: Spoon M Date: Tue, 20 Sep 2005 19:06:38 +0000 Subject: [PATCH] herm git-svn-id: file:///home/svn/incoming/trunk@2859 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/struct2/c_struct.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/rex/struct2/c_struct.rb b/lib/rex/struct2/c_struct.rb index ca43ecf60e..6523ffabd7 100644 --- a/lib/rex/struct2/c_struct.rb +++ b/lib/rex/struct2/c_struct.rb @@ -113,6 +113,12 @@ class CStruct < SStruct name = ress.shift res = ress.shift self[name].restraint = res + + # update the restrainted object, so it will update the value + # of the restrainter, with the initial size. If you don't + # want this behavior, um, you'll have to be careful with what + # you supply as default values... + self[name].update_restraint end return self end