diff src/luan/impl/LuanImpl.java @ 1330:f41919741100

fix security
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 11 Feb 2019 01:38:55 -0700
parents 9fa8b8389578
children 25746915a241
line wrap: on
line diff
--- a/src/luan/impl/LuanImpl.java	Sun Feb 10 02:01:49 2019 -0700
+++ b/src/luan/impl/LuanImpl.java	Mon Feb 11 01:38:55 2019 -0700
@@ -162,7 +162,7 @@
 			tbl.put(key,value);
 			return;
 		}
-		if( t != null && luan.javaOk.ok )
+		if( t != null && luan.peek().javaOk )
 			JavaLuan.__new_index(luan,t,key,value);
 		else
 			throw new LuanException( "attempt to index a " + Luan.type(t) + " value" );
@@ -229,7 +229,7 @@
 		}
 	}
 
-	public static LuanTable table(LuanState luan,Object[] a) {
+	public static LuanTable table(LuanState luan,Object[] a) throws LuanException {
 		LuanTable table = new LuanTable(luan);
 		int i = 0;
 		for( Object fld : a ) {