Change getCurrentPc: this fixes the line number difference in testModule.

This commit is contained in:
Ian Farmer
2008-06-02 04:04:31 +00:00
parent 9fa8b26e2d
commit db457117e3

View File

@@ -1022,8 +1022,8 @@ public class LuaState extends Lua {
* @return the current program counter for the given call frame.
*/
protected int getCurrentPc(CallInfo ci) {
int pc = (ci != calls[cc] ? ci.pc - 1 : ci.pc);
return pc;
int pc = ci.pc;
return pc > 0 ? pc - 1 : 0;
}
protected String getSourceFileName(LString source) {