Bugzilla – Attachment 70 Details for
Bug 138
std.enconding: EncodingSchemeUtf16Native and EncodingSchemeUtf32Native invalid splicing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Bug creation and email sending has been disabled, file new bugs at
gcc.gnu.org/bugzilla
[patch]
bugfix
std_encode_utfX.patch (text/plain), 1.33 KB, created by
Ketmar Dark
on 2014-06-14 19:45:55 CEST
(
hide
)
Description:
bugfix
Filename:
MIME Type:
Creator:
Ketmar Dark
Created:
2014-06-14 19:45:55 CEST
Size:
1.33 KB
patch
obsolete
>diff --git a/libphobos/src/std/encoding.d b/libphobos/src/std/encoding.d >index fd6b0b0..036e24d 100644 >--- a/libphobos/src/std/encoding.d >+++ b/libphobos/src/std/encoding.d >@@ -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..$]; > return c; > } > >@@ -2800,7 +2800,7 @@ class EncodingSchemeUtf16Native : EncodingScheme > { > auto t = cast(const(wchar)[]) s; > dchar c = std.encoding.safeDecode(t); >- s = s[$-t.length..$]; >+ s = s[$-t.length*wchar.sizeof..$]; > return c; > } > >@@ -2865,7 +2865,7 @@ class EncodingSchemeUtf32Native : EncodingScheme > { > auto t = cast(const(dchar)[]) s; > dchar c = std.encoding.decode(t); >- s = s[$-t.length..$]; >+ s = s[$-t.length*dchar.sizeof..$]; > return c; > } > >@@ -2878,7 +2878,7 @@ class EncodingSchemeUtf32Native : EncodingScheme > { > auto t = cast(const(dchar)[]) s; > dchar c = std.encoding.safeDecode(t); >- s = s[$-t.length..$]; >+ s = s[$-t.length*dchar.sizeof..$]; > return c; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 138
: 70