[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Minor correctness issue with l_str2d's use of ltolower
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 1 Sep 2020 10:06:25 -0300
> ltolower could be enhanced with a check such as:
>
> #define ltolower(c) check_exp((c) >= 'A' && (c) <= 'Z' || (c) >= 'a' && (c) <= 'z', ((c) | ('A' ^ 'a')))
>
> [...]
>
> Note: this doesn't change the code's behavior at all, because 0 is equivalent to '.' (or 46, which is the value returned by ltolower('.')) when doing the subsequent checks against mode. It's mostly just cause for confusion.
Thanks for the feedback.
-- Roberto