Taking screenshot crashes
With nico 0.3.2 on OSX, when taking a screenshot with `F10` the nico apps crashes.
This happens for nico examples (paintout, gui, vertex, etc) as well for my own games.

```
Traceback (most recent call last)
/Users/username/Projects/nico/nico/examples/paintout.nim(161) paintout
/Users/username/Projects/nico/nico/nico.nim(2942) run
/Users/username/Projects/nico/nico/nico/backends/sdl2.nim(1662) run
/Users/username/Projects/nico/nico/nico/backends/sdl2.nim(1209) step
/Users/username/Projects/nico/nico/nico/backends/sdl2.nim(1197) checkInput
/Users/username/Projects/nico/nico/nico/backends/sdl2.nim(1104) appHandleEvent
/Users/username/Projects/nico/nico/nico/backends/sdl2.nim(742) saveScreenshot
/Users/username/Projects/nico/nico/nico/ringbuffer.nim(42) []
/Users/username/Projects/nico/nico/nico/ringbuffer.nim(37) idx
SIGFPE: Arithmetic error.
```