Fix the 'MAP_FOLDCZONE' ok() test.

Francois Gouget fgouget at free.fr
Sat Nov 11 06:26:01 CST 2006


Just as an additional note, the initial bug is this:

> -       (ch >= 0xFA0D && ch <= 0xFA47) ||
> -       0xf92c || ch == 0xf979 || ch == 0xf995 || ch == 0xf9e7 || ch == 0xf9f1,
          ^^^^^^

This caused the test to always be true, and thus never fail. I found 
this bug using the following command (inspired by Macrus Meissner's 
recent fixes):

egrep -r -i '((&&|\|\|) *[0-9]|\b([0-9][0-9]*|0x[0-9a-f][0-9a-f]*) *(&&|\|\|))' . |
  perl -p -e 's/(<|<=|==|!=|>=|>)\s*(0x[0-9a-f]+|-?[0-9]+)\s*(&&|\|\|)//g;'
          -e 's/(&&|\|\|)\s*(0x[0-9a-f]+|-?[0-9]+)\s*(<|<=|==|!=|>=|>)//g;' |
  egrep '((&&|\|\|) *[0-9]|\b([0-9][0-9]*|0x[0-9a-f][0-9a-f]*) *(&&|\|\|))'

I'm posting it in case someone wants to expand on it or notices a bug. 
As it is I believe it should not have any false negatives (except in 
case of macros), while having few enough false positives (less than 150) 
to be usable.

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
           If it stinks, it's chemistry. If it moves, it's biology.
                  If it does not work, It's computer science.



More information about the wine-patches mailing list