Mark Atwood (fallenpegasus) wrote,
Mark Atwood
fallenpegasus

Spot the stupid bug

 { struct foo a; magicfunc((void *) &a, sizeof(a)); fprintf(stdlog, "value1 %d\n", a.x); }

{ uint8_t *b; b = (uint8_t *) malloc(N); magicfunc((void *) &b, N); fprintf(stdlog, "value2 %d\n", *(b+0)); } 


I've been beating myself over the head on this since yesterday afternoon, `till I *finally* saw that extra ampersand.

Mark feel dumb.
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment