aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtelem.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/telem.lua b/telem.lua
index 704855c..51f312f 100755
--- a/telem.lua
+++ b/telem.lua
@@ -227,7 +227,7 @@ function do_go()
print("No such board! Hit `l` to list boards.")
else
local index = tonumber(board)
- if index < 0 or index > #boards then
+ if index < 1 or index > #boards then
print("No such board! Hit `l` to list boards.")
else
current_board = boards[index]
@@ -478,7 +478,7 @@ function do_type()
if not check_at_board() then return end
io.write("Read which thread? ")
local thread_id = tonumber(io.read())
- if not thread_id or thread_id < 0 or thread_id > #current_board_threads then
+ if not thread_id or thread_id < 1 or thread_id > #current_board_threads then
print("Invalid thread index!")
return
end
@@ -503,7 +503,7 @@ function do_reply()
if not check_at_board() then return end
io.write("Reply to which thread? ")
local thread_id = tonumber(io.read())
- if not thread_id or thread_id < 0 or thread_id > #current_board_threads then
+ if not thread_id or thread_id < 1 or thread_id > #current_board_threads then
print("Invalid thread index!")
return
end