[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (beta) now available
- From: Coda Highland <chighland@...>
- Date: Thu, 23 Oct 2014 12:43:33 -0700
On Thu, Oct 23, 2014 at 12:39 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> lstrlib.c, line 1142. Change:
>> buff[islittle ? i : size - 1 - i] = (n & MC);
>> To:
>> buff[islittle ? i : size - 1 - i] = (char)(n & MC);
>> Explanation: Prevents compiler warning about possible loss of data.
>
> This compiler seems quite dumb :-) How can (n & 0xFF) loose data??
It is a dumb compiler, it's only looking at the types of the
parameters (trying to assign an int into a char) and complaining. I'm
guessing Visual Studio 6 but I could be wrong.
/s/ Adam