BLARGGGG. Actually remove the null terminating byte (instead of returning the same string, bug). Another bug treating all registry keys that are a string as a dword...

git-svn-id: file:///home/svn/framework3/trunk@3749 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Spoon M 2006-07-18 20:37:38 +00:00
parent 41890a86f2
commit f95d4174de
1 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ class Registry
if (type == REG_SZ) if (type == REG_SZ)
data += "\x00" data += "\x00"
else (type == REG_DWORD) elsif (type == REG_DWORD)
data = [ data.to_i ].pack("V") data = [ data.to_i ].pack("V")
end end
@ -162,7 +162,7 @@ class Registry
type = response.get_tlv(TLV_TYPE_VALUE_TYPE).value; type = response.get_tlv(TLV_TYPE_VALUE_TYPE).value;
if (type == REG_SZ) if (type == REG_SZ)
data = data[0..-1] data = data[0..-2]
elsif (type == REG_DWORD) elsif (type == REG_DWORD)
data = data.unpack("N")[0] data = data.unpack("N")[0]
end end