isctype.c assert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chen01701
    New Member
    • May 2007
    • 1

    isctype.c assert

    Hi,

    We got a n assert in our application program: Debug Assertion Failed! File: isctype.c Line: 68 Expression (unsigned) (c+1) <=256

    Can someone explain the cause of the assertion? Is it caused by user program, or caused by C library internal? How to avoid this problem?

    Thanks

    Jun
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    You have posted this in the Articles section. I am moving it to the C++ / C forum.

    ADMIN

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      Originally posted by chen01701
      We got a n assert in our application program: Debug Assertion Failed! File: isctype.c Line: 68 Expression (unsigned) (c+1) <=256

      Can someone explain the cause of the assertion? Is it caused by user program, or caused by C library internal? How to avoid this problem?
      Almost certainly a program error, the message is telling you the expression that was false and caused the assert so

      ((unsigned) (c+1) <=256) == false

      causing an assertion. Most likely you have passed a value to one of is is<type> (isdigit for example) that is outside the valid range for a char.

      Comment

      Working...