Explorar o código

[lua] give error message for missing bit library, see #6258

Justin Donaldson %!s(int64=8) %!d(string=hai) anos
pai
achega
945b8a8e7b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/generators/genlua.ml

+ 2 - 0
src/generators/genlua.ml

@@ -1954,6 +1954,8 @@ let generate com =
 	    println ctx "  _hx_bit = setmetatable({}, { __index = _hx_bit_raw });";
 	    println ctx "  _hx_bit.bnot = function(...) return _hx_bit_clamp(_hx_bit_raw.bnot(...)) end;"; (* lua 5.2  weirdness *)
 	    println ctx "  _hx_bit.bxor = function(...) return _hx_bit_clamp(_hx_bit_raw.bxor(...)) end;"; (* lua 5.2  weirdness *)
+	    println ctx "else";
+            println ctx "  _G.error(\"Bitop library is missing.  Please install luabitop\");";
 	    println ctx "end";
 	end;