videos: fix 'Arithmetic overflow' error

pull/3238/head
Samantaz Fox 2 years ago
parent cc5c83333f
commit 47cc26cb3c
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -280,7 +280,7 @@ struct Video
{% for op, type in {i32: Int32, i64: Int64} %} {% for op, type in {i32: Int32, i64: Int64} %}
private macro getset_{{op}}(name) private macro getset_{{op}}(name)
def \{{name.id.underscore}} : {{type}} 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 end
def \{{name.id.underscore}}=(value : Int) def \{{name.id.underscore}}=(value : Int)

Loading…
Cancel
Save