On Fri, Jul 06, 2007 at 04:50:17PM +0200, Abdelrazak Younes wrote: > [EMAIL PROTECTED] wrote: > > Author: younes > > Date: Fri Jul 6 16:43:18 2007 > > New Revision: 19001 > > > > URL: http://www.lyx.org/trac/changeset/19001 > > Log: > > * lstring.cpp: > > - isAscii(): char is signed with MSVC so the comparison was not correct. > > Add a static_cast to "unsigned char" as per the other methods. > > I took the liberty to commit this fix as it is obviously correct and > would have bitten us sooner than later.
Abdel, I really wonder if you know what you are doing. Please, try to compile and launch the attached C++ source. -- Enrico
#include <iostream> using namespace std; int main() { for (int i = 128; i < 1000; ++i) { if (static_cast<unsigned char>(i) >= 0x80) continue; cout << "Surprise! " << i << " is less than 128." << endl; } }