git: 0495ed398c4f - main - contrib/lua: update to 5.4.2

Mateusz Guzik mjguzik at gmail.com
Fri Jan 15 15:21:09 UTC 2021


I confirm this fixes it.

On 1/15/21, Kyle Evans <kevans at freebsd.org> wrote:
> On Fri, Jan 15, 2021 at 7:06 AM Mateusz Guzik <mjguzik at gmail.com> wrote:
>>
>> There is some garbage shown by the boot loader since this commit.
>> Screenshot from VirtualBox:
>> https://people.freebsd.org/~mjg/loader_artifact.png
>>
>> An additional fixup is needed to see it:
>> commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main,
>> freebsd/main, freebsd/HEAD)
>> Author: Toomas Soome <tsoome at FreeBSD.org>
>> Date:   Fri Jan 15 14:58:12 2021 +0200
>>
>>     loader: do not update palette in text mode (real fix)
>>
>> otherwise the screen is blank.
>>
>
> The patch below will fix it (assuming we're both looking at the
> "Welcome to FreeBSD" misposition + leading garbage); there's clearly
> an additional hack needed with Lua 5.4 to make sure that we don't get
> a "float" (of course it's floored because we can't do floating point
> here) from division, but this comes up so rarely that I'm not sure
> it's worth specifically hacking around. Notably, below is the only
> place that stock lualoader does arithmetic that results in a "float"
> and, IMHO, it really should be a floor division like this anyways to
> be more explicit that we're flooring it.
>
> I'll push something to fix it within a couple hours. CC imp@, I'm
> leaning towards just pushing the below and not hacking lua further,
> but a second opinion would be appreciated.
>
> diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua
> index 3ace3884ff8..6062d7e87a0 100644
> --- a/stand/lua/drawer.lua
> +++ b/stand/lua/drawer.lua
> @@ -283,7 +283,7 @@ local function drawbox()
>                 end
>         end
>         if menu_header_x == nil then
> -               menu_header_x = x + (w / 2) - (#menu_header / 2)
> +               menu_header_x = x + (w // 2) - (#menu_header // 2)
>         end
>         screen.setcursor(menu_header_x, y)
>         printc(menu_header)
>


-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the dev-commits-src-all mailing list