Bitwise operators in lua.

User avatar
Sane
Member
 
Posts: 103
Joined: Tue Jun 17, 2014 09:31
GitHub: mt-sane
In-game: Sane

Bitwise operators in lua.

by Sane » Sun Aug 09, 2015 20:04

Hi there,

it seems that the bitwise operators >>, <<, ~ in lua don't work. When using any of them I get syntax errors.

Using BitOp lib works. The following prints "....11".
+ using BitOp lib

But require is not allowed when security is on. I've tried to set the mod as trusted, but that still doesn't work.
+ setting security in minetest.conf


  • Shouldn't the operators work?
  • If forced to use BitOp, maybe it could be referenced by default, so no require is needed and thus no security issues.
  • Why does setting test as trusted not allow using require?

using minetest-0.4.12-7a6e4dc (sfan5's build)
on windows.

Steps to reproduce:
o Set ... games\minimal\mods\test\init.lua to the code mentioned above.
o Run any game
o Marvel at syntax error messages or security issues messages.
Trying to stay me.
 

est31
Member
 
Posts: 172
Joined: Mon Dec 29, 2014 01:49

Re: Bitwise operators in lua.

by est31 » Mon Aug 10, 2015 13:14

 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 4 guests

cron