solvit: made version serializing reduce ranges that behave as one single version

it is possible that a range that gets generated could have the same exact version on both ends. if that happens, this small code will reduce it to one
This commit is contained in:
Ponali
2026-05-02 19:45:29 +02:00
parent b6cdae3408
commit 26a61c6e6c
+10 -3
View File
@@ -84,10 +84,17 @@ function avs.serializeSingle(ver)
end end
function avs.serializeVersion(ver) function avs.serializeVersion(ver)
out="" local singles = {}
for i=1,#ver do for i=1,#ver do
out=out..avs.serializeSingle(ver[i]) table.insert(singles,avs.serializeSingle(ver[i]))
if i~=#ver then end
if singles[1]==singles[2] then
singles={singles[1]}
end
local out=""
for i=1,#singles do
out=out..singles[i]
if i~=#singles then
out=out.."-" out=out.."-"
end end
end end