Menu

#50 code relying on char being unsigned

closed-fixed
None
5
2010-08-22
2009-02-13
No

The return value of functions like strcmp, memcmp relies on char being unsigned. If char is signed (like with gcc on 68k or x86) return value can be wrong.

(Someone noticed similiar bug in AROS clib and I looked around to see how these functions are done elsewhere)

Discussion

  • Olaf Barthel

    Olaf Barthel - 2010-08-20
    • assigned_to: nobody --> obarthel
     
  • Olaf Barthel

    Olaf Barthel - 2010-08-20

    I checked and found that this requirement exists for memcmp(), strcmp() *and* strncmp(), too.

     
  • Olaf Barthel

    Olaf Barthel - 2010-08-22
    • status: open --> closed
     
  • Olaf Barthel

    Olaf Barthel - 2010-08-22

    Fixed in clib2 1.205

     
  • Olaf Barthel

    Olaf Barthel - 2010-08-22
    • status: closed --> closed-fixed
     

Log in to post a comment.