Skip to content

fix Issue 12853 - std.encoding EncodingSchemeUtf16Native and EncodingSch... #2336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2014
Merged

fix Issue 12853 - std.encoding EncodingSchemeUtf16Native and EncodingSch... #2336

merged 2 commits into from
Jul 17, 2014

Conversation

AndrewEdwards
Copy link
Contributor

...emeUtf32Native decode() and SafeDecode() wrong stripping length

Submitting pull as implemented by Ketmar Dark in https://issues.dlang.org/show_bug.cgi?id=12853

…SchemeUtf32Native decode() and SafeDecode() wrong stripping length
@@ -2787,7 +2787,7 @@ class EncodingSchemeUtf16Native : EncodingScheme
{
auto t = cast(const(wchar)[]) s;
dchar c = std.encoding.decode(t);
s = s[$-t.length..$];
s = s[$-t.length*wchar.sizeof..$];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space around operators please

s = s[$ - t.length * wchar.sizeof .. $];

(throughout)

@andralex
Copy link
Member

Fine pending nits.

@braddr
Copy link
Member

braddr commented Jul 16, 2014

Not fine without a unit test. There's one in the bug report and it (or something like it) should be included in the pull.

…SchemeUtf32Native decode() and SafeDecode() wrong stripping length
@AndrewEdwards
Copy link
Contributor Author

@andralex , @braddr Hopefully I did that correctly.

@quickfur
Copy link
Member

LGTM

@yebblies
Copy link
Member

Auto-merge toggled on

yebblies added a commit that referenced this pull request Jul 17, 2014
fix Issue 12853 - std.encoding EncodingSchemeUtf16Native and EncodingSch...
@yebblies yebblies merged commit 1f39823 into dlang:master Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants