fix #4078 (float-->int conversion overflow)