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)
Wed, Nov 13, 6:27 AM
Unknown Object (File)
Mon, Nov 11, 1:04 AM
Unknown Object (File)
Sun, Nov 10, 3:22 AM
Unknown Object (File)
Sun, Nov 10, 2:02 AM
Unknown Object (File)
Sat, Nov 9, 2:49 PM
Unknown Object (File)
Thu, Nov 7, 7:47 AM
Unknown Object (File)
Wed, Nov 6, 1:54 PM
Unknown Object (File)
Mon, Nov 4, 7:10 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.