Skip to content

Commit

Permalink
Fix for #107: Z80CPU Error: TypeError: Cannot read properties of unde…
Browse files Browse the repository at this point in the history
…fined (reading 'start')
  • Loading branch information
maziac committed Feb 16, 2023
1 parent c7705dc commit 60ff54b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/debugadapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,7 @@ E.g. use "-help -view" to put the help text in an own view.
protected async setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments) {
const ref = args.variablesReference;
const name = args.name;
const value = args.value;
const valueString = args.value;

ShallowVar.clearChanged();

Expand All @@ -2989,6 +2989,8 @@ E.g. use "-help -view" to put the help text in an own view.
response.message = msg;
}
else {
// Convert string to number
const value = Utility.evalExpression(valueString, true);
// Set value
const formattedString = await varObj.setValue(name, value);
// Send response
Expand Down

0 comments on commit 60ff54b

Please sign in to comment.