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)
Sat, Dec 14, 4:37 PM
Unknown Object (File)
Dec 7 2024, 8:47 PM
Unknown Object (File)
Dec 1 2024, 3:03 AM
Unknown Object (File)
Nov 23 2024, 1:42 AM
Unknown Object (File)
Nov 13 2024, 6:27 AM
Unknown Object (File)
Nov 11 2024, 1:04 AM
Unknown Object (File)
Nov 10 2024, 3:22 AM
Unknown Object (File)
Nov 10 2024, 2:02 AM
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.