#include #include int mouse_x = 1,mouse_y = 1; int8_t global_data[4] = {5,-5,0,0}; typedef struct { int8_t data[4]; } test; int bug(void) { return global_data[0]; } int bug2(int foo) { int8_t data[1]; data[0] = foo; return data[0]; } void bug3(void) { int8_t data[4] = {5,-5,0,0}; mouse_x += data[0]; mouse_y += data[1]; } int bug4(test t) { return t.data[0]; } int this_works(int8_t data[4]) { return data[0]; } int this_works2(test *t) { return t->data[0]; } int main(int argc,char **argv) { bug3(); printf("%d,%d\n",mouse_x,mouse_y); return 0; }