mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-18 02:48:50 +00:00
Search: Fix ArithmeticOverflow + wrong subs count issues (#3535)
This commit is contained in:
@@ -162,7 +162,7 @@ def number_with_separator(number)
|
||||
end
|
||||
|
||||
def short_text_to_number(short_text : String) : Int64
|
||||
matches = /(?<number>\d+(\.\d+)?)\s?(?<suffix>[mMkKbB])?/.match(short_text)
|
||||
matches = /(?<number>\d+(\.\d+)?)\s?(?<suffix>[mMkKbB]?)/.match(short_text)
|
||||
number = matches.try &.["number"].to_f || 0.0
|
||||
|
||||
case matches.try &.["suffix"].downcase
|
||||
|
||||
Reference in New Issue
Block a user