http://d.puremagic.com/issues/show_bug.cgi?id=3245
Summary: Easy bug fix available for disabled unit test code in std.encoding Product: D Version: 2.031 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: y0uf00...@gmail.com Bug: unittest line 55 in std.encoding was disabled by version(none) Rationale: Re-enabling unittest at line 55 results in failure. Fix: At line 1059 inside template EncoderInstance(CharType : char). Current version: dchar decodeReverseViaRead()() { auto c = read; .... Fixed version: dchar decodeReverseViaRead()() { dchar c = read; .... Its obvious after failure point is pinned, even if not knowing the exact specs, as decodeReverseViaRead must return a dchar, and variable c accumulates left shifted bits in the loop, same as the nearby safeDecodeViaRead method. In UTF-8,the auto c = read makes a char type only (thank you zerobugs debugger), so high bits put in c are thrown away, and function may return character 0. Re-enabled unittest code ran succesfully after above fix. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------