1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 06:28:58 +01:00

🐛 Fix MaxUint32 assignment to platform int

This fixes an issue where math.MaxUint32 is assigned to a platform
dependent int type. This works on 64-bit platforms without issue due to
there being plenty of space. On 32-bit platforms this is wrong and will
not compile as math.MaxUint32 > math.MaxInt32.
This commit is contained in:
Ben Doerr 2021-06-23 09:55:14 -04:00 committed by Oliver Steele
parent beafe4eb95
commit c0ad3cec70

View File

@ -664,7 +664,7 @@ yydefault:
yyDollar = yyS[yypt-0 : yypt+1] yyDollar = yyS[yypt-0 : yypt+1]
//line expressions.y:105 //line expressions.y:105
{ {
yyVAL.loopmods = loopModifiers{Cols: math.MaxUint32} yyVAL.loopmods = loopModifiers{Cols: math.MaxInt32}
} }
case 21: case 21:
yyDollar = yyS[yypt-2 : yypt+1] yyDollar = yyS[yypt-2 : yypt+1]