arcticfox1919 / LuaDardo

A Lua virtual machine written in Dart
Apache License 2.0
176 stars 34 forks source link

os_lib.dart _setField return int ? #5

Closed au-top closed 3 years ago

au-top commented 3 years ago

I encountered the following code before converting code to null security

code in https://github.com/arcticfox1919/LuaDardo/blob/b472a58b7c9ac4020916f48c31bddcc2b282ac24/lib/src/stdlib/os_lib.dart

  static int _setField(LuaState ls, String key, int value) {
    ls.pushInteger(value);
    ls.setField(-2, key);
  }

edit to

  static void _setField(LuaState ls, String key, int value) {
    ls.pushInteger(value);
    ls.setField(-2, key);
  }