[cc65] stack corruption

From: MagerValp <MagerValp1cling.gu.se>
Date: 2004-07-21 13:44:59
In drawentry.h I had:

  void DrawEntryDiskID(unsigned chardiskid);

and in drawentry.c:

  void DrawEntryDiskID(unsigned char diskid);

this time with a space. The function call pushed an int on the stack,
and the function pulls a char, causing a corrupt stack on return. At
least that's what I think happened.

No warning is emitted by the compiler, but the same goes for gcc with
-Wall -ansi -pedantic. gcc emits working code, but that might just be
luck.

Any chance that the compiler could catch this?


I keep creating the stupidest bugs... :/

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jul 21 13:45:02 2004

This archive was generated by hypermail 2.1.8 : 2004-07-21 13:45:11 CEST