https://issues.dlang.org/show_bug.cgi?id=18307

Zach the Mystic <reachz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reachz...@gmail.com

--- Comment #1 from Zach the Mystic <reachz...@gmail.com> ---
I tested it and this works:

// change this:
// value = -(cast(T)-header);

// to this:
value = cast(T)cast(byte)header;

header is a ubyte. When changed to a byte, in this context, it becomes
negative. The compiler then creates a corresponding negative int.

--

Reply via email to