]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix dump of bytecode instructions with missing operands.
authorMike Pall <mike>
Thu, 11 Feb 2010 19:59:00 +0000 (20:59 +0100)
committerMike Pall <mike>
Thu, 11 Feb 2010 19:59:00 +0000 (20:59 +0100)
lib/bc.lua

index 89f22163bbe4c337e550807edf75e2a9d645a50d..51fc1bd085123c47b51db3d3da5e856607105537 100644 (file)
@@ -74,12 +74,13 @@ local function bcline(func, pc, prefix)
     pc, prefix or "  ", sub(bcnames, oidx+1, oidx+6), ma == 0 and "" or a)
   local d = shr(ins, 16)
   if mc == 13*128 then -- BCMjump
-    if ma == 0 then
-      return format("%s=> %04d\n", sub(s, 1, -3), pc+d-0x7fff)
-    end
     return format("%s=> %04d\n", s, pc+d-0x7fff)
   end
-  if mb ~= 0 then d = band(d, 0xff) end
+  if mb ~= 0 then
+    d = band(d, 0xff)
+  elseif mc == 0 then
+    return s.."\n"
+  end
   local kc
   if mc == 10*128 then -- BCMstr
     kc = funck(func, -d-1)