#17 Fix char functions in StdAfx.cpp

closed-accepted
nobody
None
5
2002-12-08
2002-12-07
Perry
No

Char functions in StdAfx.cpp do not handle non-ASCII
data correctly; they suffer from sign-extension bug
which can cause GPF. A signed char gets
converted (sign-extended !) to a signed int, which then
gets converted back to unsigned, and now it is off
by billions.

Attached is fix: use a function to renormalize
chars involved into the 0-255 range.

Discussion

  • Christian List
    Christian List
    2002-12-08

    • status: open --> closed-accepted
     
  • Christian List
    Christian List
    2002-12-08

    Logged In: YES
    user_id=609728

    This looks like a good patch.
    I have committed the change to CVS.