Use qsnprintf instead of sprintf

This should remove a few warnings on MSVC