Fix the getBreakpoint() function in the HTML Debugger client. (#1839)

There was a problem around the offset, the function tried to use some invalid object reference.

JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
Imre Kiss
2017-05-19 14:38:19 +02:00
committed by Zoltan Herczeg
parent ffdf151387
commit 833796a20f
+3 -3
View File
@@ -524,16 +524,16 @@ function DebuggerClient(address)
var func = functions[breakpointData[0]]; var func = functions[breakpointData[0]];
var offset = breakpointData[1]; var offset = breakpointData[1];
if (offset in functions) if (offset in func.offsets)
{ {
returnValue.breakpoint = func.offsets[offset]; returnValue.breakpoint = func.offsets[offset];
returnValue.at = true; returnValue.at = true;
return returnValue; return returnValue;
} }
if (offset < functions.firstBreakpointOffset) if (offset < func.firstBreakpointOffset)
{ {
returnValue.breakpoint = func.offsets[firstBreakpointOffset]; returnValue.breakpoint = func.offsets[func.firstBreakpointOffset];
returnValue.at = true; returnValue.at = true;
return returnValue; return returnValue;
} }