swrast: fix undefined shift of 1 << 31

Pointed out by coverity

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
Dave Airlie 2019-04-11 20:36:03 +10:00
parent e4ed08873b
commit 4690f90728
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ clip_span( struct gl_context *ctx, SWspan *span )
* For arrays of values, shift them left.
*/
for (i = 0; i < VARYING_SLOT_MAX; i++) {
if (span->interpMask & (1 << i)) {
if (span->interpMask & (1u << i)) {
GLuint j;
for (j = 0; j < 4; j++) {
span->attrStart[i][j] += leftClip * span->attrStepX[i][j];