ws-cleanup-types: archive, audio, data, font, image, layered, music, playlist, subtitle, vector, video: annotations, casts, one value per re-assignment where the solver loses the type
This commit is contained in:
1 parent
dc98aec2ec
commit
f459b2dcdf
44 files changed
+172
-119
No files matched your search
@@ -26,19 +26,27 @@ function Codec.decode(b: buffer, p: number, limit: number, out: buffer, n: numbe
|
||||
if p + 3 > limit then
|
||||
return false, "truncated"
|
||||
end
|
||||
r, g, bl = readu8(b, p), readu8(b, p + 1), readu8(b, p + 2)
|
||||
r = readu8(b, p)
|
||||
g = readu8(b, p + 1)
|
||||
bl = readu8(b, p + 2)
|
||||
p += 3
|
||||
elseif op == 0xFF then
|
||||
if p + 4 > limit then
|
||||
return false, "truncated"
|
||||
end
|
||||
r, g, bl, a = readu8(b, p), readu8(b, p + 1), readu8(b, p + 2), readu8(b, p + 3)
|
||||
r = readu8(b, p)
|
||||
g = readu8(b, p + 1)
|
||||
bl = readu8(b, p + 2)
|
||||
a = readu8(b, p + 3)
|
||||
p += 4
|
||||
else
|
||||
local tag = op // 64
|
||||
if tag == 0 then
|
||||
local q = op * 4
|
||||
r, g, bl, a = readu8(index, q), readu8(index, q + 1), readu8(index, q + 2), readu8(index, q + 3)
|
||||
r = readu8(index, q)
|
||||
g = readu8(index, q + 1)
|
||||
bl = readu8(index, q + 2)
|
||||
a = readu8(index, q + 3)
|
||||
elseif tag == 1 then
|
||||
r = (r + (op // 16) % 4 - 2) % 256
|
||||
g = (g + (op // 4) % 4 - 2) % 256
|
||||
|
||||
Reference in new issue
Block a user