[RFC] coverity/13749: fix negative array index read

This PR fixes one of the Coverity issues listed in #760.
This is my first contribution trying to follow the project guidelines.
Comments are most welcome.


We should probably at least log an error here. `#include "nvim/log.h"` and then call `ELOG()`.