mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
videos: fix 'Arithmetic overflow' error
This commit is contained in:
parent
cc5c83333f
commit
47cc26cb3c
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ struct Video
|
|||
{% for op, type in {i32: Int32, i64: Int64} %}
|
||||
private macro getset_{{op}}(name)
|
||||
def \{{name.id.underscore}} : {{type}}
|
||||
return info[\{{name.stringify}}]?.try &.as_i.to_{{op}} || 0_{{op}}
|
||||
return info[\{{name.stringify}}]?.try &.as_i64.to_{{op}} || 0_{{op}}
|
||||
end
|
||||
|
||||
def \{{name.id.underscore}}=(value : Int)
|
||||
|
|
Loading…
Reference in a new issue