Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/table/Format.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ struct FunctionPart: FormatExpr {
}

if name == "random" {
let from = arguments.count == 1 ? try Int(arguments[0].fill(row: row))! : 0
let to = arguments.count == 2 ? try Int(arguments[1].fill(row: row))! : try Int(arguments[0].fill(row: row))!
let from = arguments.count > 0 ? try Int(arguments[0].fill(row: row))! : 0
let to = arguments.count == 2 ? try Int(arguments[1].fill(row: row))! : try Int(arguments[0].fill(row: row))!
return String(Int.random(in: from...to))
}

Expand Down
Loading