diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2022-11-16 18:18:35 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2022-11-16 18:25:32 +0100 |
| commit | 47cc26cb3c5862e6ae96f89882ee08c6a8185672 (patch) | |
| tree | b1b28900e78e5795e23651b1c5e560a2857b577d /src | |
| parent | cc5c83333f2a51dc178b698a548b64f01a2ff453 (diff) | |
| download | invidious-47cc26cb3c5862e6ae96f89882ee08c6a8185672.tar.gz invidious-47cc26cb3c5862e6ae96f89882ee08c6a8185672.tar.bz2 invidious-47cc26cb3c5862e6ae96f89882ee08c6a8185672.zip | |
videos: fix 'Arithmetic overflow' error
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/videos.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 786ef416..d626c7d1 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) |
