Page MenuHomeFreeBSD

stand/lua: Chop of the decimal for numbers passed to setcursor
ClosedPublic

Authored by kevans on Feb 14 2018, 6:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 2 2024, 4:59 PM
Unknown Object (File)
Dec 20 2023, 2:17 AM
Unknown Object (File)
Dec 19 2023, 8:53 PM
Unknown Object (File)
Oct 25 2023, 6:02 PM
Unknown Object (File)
Aug 28 2023, 12:36 PM
Unknown Object (File)
Aug 28 2023, 12:36 PM
Unknown Object (File)
Aug 28 2023, 12:33 PM
Unknown Object (File)
Aug 28 2023, 12:21 PM
Subscribers
None

Details

Summary

Decimals screw up the escape sequence and the cursor will not get set. Right now this only affects setting the cursor for drawing "Welcome to FreeBSD" -- the resulting number after our (x+(w/2)-9) calculation gets output as "14.0," which likely isn't bad in the general case but messes this part up.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stand/lua/screen.lua
36 ↗(On Diff #39312)

Replacing "[.]" with "%."

yea, go ahead and commit this. I'd rather we fix lua to generate the right thing, but that's a few days away.

This revision is now accepted and ready to land.Feb 16 2018, 4:26 PM

(Hitting accept on accident, can't find a way to clear it in mobile browser)

I'll add an "XXX TODO" comment along those lines prior to commit so it doesn't completely fall off the radar.

This revision was automatically updated to reflect the committed changes.