diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1544,8 +1544,10 @@ static KOption getdetails (Header *h, size_t totalsize, const char **fmt, | |||
1544 | else { | 1544 | else { |
1545 | if (align > h->maxalign) /* enforce maximum alignment */ | 1545 | if (align > h->maxalign) /* enforce maximum alignment */ |
1546 | align = h->maxalign; | 1546 | align = h->maxalign; |
1547 | if (l_unlikely(!ispow2(align))) /* not a power of 2? */ | 1547 | if (l_unlikely(!ispow2(align))) { /* not a power of 2? */ |
1548 | *ntoalign = 0; /* to avoid warnings */ | ||
1548 | luaL_argerror(h->L, 1, "format asks for alignment not power of 2"); | 1549 | luaL_argerror(h->L, 1, "format asks for alignment not power of 2"); |
1550 | } | ||
1549 | else { | 1551 | else { |
1550 | /* 'szmoda' = totalsize % align */ | 1552 | /* 'szmoda' = totalsize % align */ |
1551 | unsigned szmoda = cast_uint(totalsize & (align - 1)); | 1553 | unsigned szmoda = cast_uint(totalsize & (align - 1)); |