[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bug, -0 is not evaluated correctly.
- From: Asko Kauppi <asko.kauppi@...>
- Date: Thu, 6 Jan 2005 18:04:42 +0200
How about a 'decisions.txt' file included in the distribution? This
would include short comments on things like this, to make clear
something has been considered. Potentially, also a short solution s.a.
yours could be included.
The website is too heavy & 'far away' for this, such a document should
accompany the sources themselves imho. Note that it would be 'deep
reading', not necessary for any newcomer but might be interesting
6.1.2005 kello 17:37, Roberto Ierusalimschy kirjoitti:
An easy way to support -0 is to avoid the optimization when the value
zero. I guess the fix would be simply the following:
- if (e->k == VK && ttisnumber(&fs->f->k[e->info]))
+ if (e->k == VK && ttisnumber(&fs->f->k[e->info]) &&
+ nvalue(&fs->f->k[e->info]) != 0)
(Untested code for Lua 5.0.2)
The question is whether we really should care about those details...