From: Richard Jones Date: Thu, 25 Mar 2010 19:39:07 +0000 (+0000) Subject: perl: Fix $h->value_value method when returning an empty value. X-Git-Tag: 1.2.1~12 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=8993116eec9b213a86a1b4d1defa94830a106818;p=hivex.git perl: Fix $h->value_value method when returning an empty value. Previously this didn't correctly return an empty registry value. In this case the length argument to newSVpv would be 0 which tells Perl to try to calculate the length (we want newSVpvn instead). --- diff --git a/generator/generator.ml b/generator/generator.ml index 230b66b..96d198d 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -2439,7 +2439,7 @@ DESTROY (h) name; pr " EXTEND (SP, 2);\n"; pr " PUSHs (sv_2mortal (newSViv (type)));\n"; - pr " PUSHs (sv_2mortal (newSVpv (r, len)));\n"; + pr " PUSHs (sv_2mortal (newSVpvn (r, len)));\n"; pr " free (r);\n"; | RInt64 ->