1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-18 16:10:26 +02:00

Support for null chars in rawString view

This commit is contained in:
Brian Fiete 2020-05-28 10:06:07 -07:00
parent 49a470e154
commit 1097619f48
5 changed files with 24 additions and 24 deletions

View file

@ -203,7 +203,7 @@ namespace IDE.Debugger
static extern void Debugger_EvaluateContinueKeep();
[CallingConvention(.Stdcall),CLink]
static extern char8* Debugger_Evaluate(char8* expr, int32 callStackIdx, int32 cursorPos, int32 language, EvalExpressionFlags expressionFlags);
static extern StringView Debugger_Evaluate(char8* expr, int32 callStackIdx, int32 cursorPos, int32 language, EvalExpressionFlags expressionFlags);
[CallingConvention(.Stdcall),CLink]
static extern char8* Debugger_EvaluateToAddress(char8* expr, int32 callStackIdx, int32 cursorPos);
@ -760,9 +760,7 @@ namespace IDE.Debugger
// AllowAssignment, allowCalls
public void Evaluate(String expr, String outVal, int cursorPos = -1, int language = -1, EvalExpressionFlags expressionFlags = EvalExpressionFlags.None)
{
char8* result = Debugger_Evaluate(expr, (expressionFlags.HasFlag(.DeselectCallStackIdx)) ? -1 : mActiveCallStackIdx, (int32)cursorPos, (int32)language, expressionFlags);
if (result == null)
return;
StringView result = Debugger_Evaluate(expr, (expressionFlags.HasFlag(.DeselectCallStackIdx)) ? -1 : mActiveCallStackIdx, (int32)cursorPos, (int32)language, expressionFlags);
outVal.Append(result);
}