From 47cc26cb3c5862e6ae96f89882ee08c6a8185672 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 16 Nov 2022 18:18:35 +0100 Subject: [PATCH] videos: fix 'Arithmetic overflow' error --- src/invidious/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 786ef4166..d626c7d18 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -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)