1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 07:28:56 +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
parent f7a10b7ade
commit 16e265c7d2

View File

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