← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 1131570] [NEW] adchpp::Core *getCurrentCore in swig/lua.i is broken because it shouldn't use fixed indices

 

Public bug reported:

The function adchpp::Core *getCurrentCore is broken since it uses the
static index 1 when calling lua_touserdata despite more elements may
have been added to the stack (the index should instead be the output of
lua_gettop(l) ). The reason why it had worked until now was because the
swig wrapper didn't add extra elements but the function failed when
called from functions with at least one argument because of that. This
patch fixes this.

** Affects: adchpp
     Importance: Undecided
         Status: New

** Patch added: "Patch to ensure lua_gettop is used instead of a static index. Copyright assigned to Jacek Sieka."
   https://bugs.launchpad.net/bugs/1131570/+attachment/3541077/+files/use_lua_gettop.patch

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to ADCH++.
https://bugs.launchpad.net/bugs/1131570

Title:
  adchpp::Core *getCurrentCore in swig/lua.i is broken because it
  shouldn't use fixed indices

Status in ADCH++:
  New

Bug description:
  The function adchpp::Core *getCurrentCore is broken since it uses the
  static index 1 when calling lua_touserdata despite more elements may
  have been added to the stack (the index should instead be the output
  of lua_gettop(l) ). The reason why it had worked until now was because
  the swig wrapper didn't add extra elements but the function failed
  when called from functions with at least one argument because of that.
  This patch fixes this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/adchpp/+bug/1131570/+subscriptions


Follow ups

References