summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/grph-swf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/grph-swf.lua')
-rw-r--r--tex/context/base/mkiv/grph-swf.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/grph-swf.lua b/tex/context/base/mkiv/grph-swf.lua
index 30089cdc4..a9297d48d 100644
--- a/tex/context/base/mkiv/grph-swf.lua
+++ b/tex/context/base/mkiv/grph-swf.lua
@@ -37,9 +37,10 @@ local function getheader(name)
buffer = f:read(20) -- ('*a')
end
f:close()
+ -- can be done better now that we have stream readers
buffer = { match(buffer,"(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)") }
for i=1,9 do
- buffer[i] = tobitstring(byte(buffer[i]))
+ buffer[i] = tobitstring(byte(buffer[i]),8,8)
end
local framebits = concat(buffer,"",1,9)
local n = tonumber(sub(framebits,1,5),2)