videos: fix 'Arithmetic overflow' error

このコミットが含まれているのは:
Samantaz Fox 2022-11-16 18:18:35 +01:00
コミット 47cc26cb3c
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: F42821059186176E
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -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)