1423 – Registry: corrupted value

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1423 - Registry: corrupted value
Summary: Registry: corrupted value
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 blocker
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年08月16日 08:16 UTC by keystuffs
Modified: 2014年02月16日 15:26 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description keystuffs 2007年08月16日 08:16:12 UTC
Sometimes the value returned from the registry in corrupted.
Ex:
 writefln(Registry.classesRoot().getKey(".txt").getValue("").value_SZ());
 Display "☺ ile" instead of "txtfile".
 writefln(Registry.classesRoot().getKey(".rar").getValue("").value_SZ());
 Display "☺ AR" instead of "WinRAR".
But:
 writefln(Registry.classesRoot().getKey(".html").getValue("").value_SZ());
 Display "htmlfile".
I tried others keys and it seems that if the length of the value is less than 8, the value returned is corrupted.
Comment 1 Vladimir Panteleev 2007年08月16日 09:14:06 UTC
Sounds like a duplicate of Bug 961.
Comment 2 keystuffs 2007年08月29日 08:37:59 UTC
I was able to fix this bug:
in the function Reg_QueryValue_, I just added a .dup
 case REG_VALUE_TYPE.REG_EXPAND_SZ:
 value = std.string.toString(cast(char*)data);
 value = value.dup; // fix the bug.
 break;
Comment 3 Walter Bright 2007年09月28日 22:12:32 UTC
Fixed dmd 1.021 and 2.004


AltStyle によって変換されたページ (->オリジナル) /