Updated return value fix from nanovg project.