When compiling the latest SVN with gcc 4.8.0 I got a warning about undefined behavior:
src/gui/sdl_mapper.cpp: In function ‘void MAPPER_StartUp(Section*)’:
src/gui/sdl_mapper.cpp:2394:47: warning: iteration 8ul invokes undefined behavior [-Waggressive-loop-optimizations]
virtual_joysticks[0].button_pressed[i]=false;
^
src/gui/sdl_mapper.cpp:2393:2: note: containing loop
for (i=0; i<16; i++) {
^
"button_pressed" seems only to contain 8 elements while the loop processes 16. Thus, I moved its initialization to a new loop. Furthermore, I spotted that the axis_pos initialization in the loop below did not initialize the axis_pos entries of the second virtual joystick. I fixed what seems to be a typo there.
I hope these are indeed fixes.