mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-10 06:15:59 +00:00
Correct implementation of clamp
That's what I get for inlining definitions.
This commit is contained in:
@@ -527,7 +527,7 @@ function read( _sReplaceChar, _tHistory, _fnComplete, _sDefault )
|
||||
local _, cy = term.getCursorPos()
|
||||
if param2 >= sx and param2 <= w and param2 == cy then
|
||||
-- Then ensure we don't scroll beyond the current line
|
||||
nPos = math.min(math.max(nScroll + x - sx, 0, #sLine))
|
||||
nPos = math.min(math.max(nScroll + x - sx, 0), #sLine)
|
||||
redraw()
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user