diff --git a/dep/glslang/glslang/MachineIndependent/Constant.cpp b/dep/glslang/glslang/MachineIndependent/Constant.cpp index e21cf427f..02cb14c82 100644 --- a/dep/glslang/glslang/MachineIndependent/Constant.cpp +++ b/dep/glslang/glslang/MachineIndependent/Constant.cpp @@ -242,8 +242,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right case EbtInt64: if (rightUnionArray[i] == 0ll) newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll); - else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll) - newConstArray[i].setI64Const((long long)-0x8000000000000000ll); + else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) + newConstArray[i].setI64Const(LLONG_MIN); else newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const()); break;