SHARE
TWEET

Untitled

a guest Mar 25th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. #define BUGGY
  4.  
  5. void funcA(int s, int g)
  6. {
  7.     int i, j = 0, k;
  8.     int grp[4] = {-1, -1};
  9.  
  10.     for (i = 0, k = 0; i < 1; ++i)  {
  11.         for (j = 0; j < 1; ++j) {
  12.             if ( grp[g] > 0 )
  13.             {
  14.                 if ( g > 5 ) {
  15.                     continue;
  16.                 }
  17.                 else  {
  18. #ifdef BUGGY
  19.                     *(long long *)grp = 0;
  20. #else
  21.                     *(int *)grp = 0;
  22.                     *(((int *)grp) + 1) = 0;
  23. #endif
  24.                 }
  25.             }
  26.  
  27.             grp[k++] = 0;
  28.         }
  29.  
  30.         printf("this should be zero: %d\n", grp[0]);
  31.     }
  32. }
  33.  
  34.  
  35. int main(void) {
  36.     funcA(0, 1);
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top