Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Lua] Ported state_cloner code to Lua 5.3
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 23 Jul 2015 17:03:17 +0000 (19:03 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 15 Oct 2015 17:17:18 +0000 (19:17 +0200)
examples/lua/state_cloner/duplicated_globals.lua

index f4df0ae..26fe0e8 100644 (file)
@@ -14,7 +14,7 @@ global_string = "A global string set by maestro"
 -- Assigns to the global string the first argument and prints it
 function set_global_string(...)
 
-  global_string = arg[1]
+  global_string = select(1, ...)
   simgrid.info("Changing the global string")
   print_global()
 end