1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 15:26:00 +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

@ -39,6 +39,8 @@
#include "BeefySysLib/util/AllocDebug.h"
#pragma warning(disable:4190)
#define ENABLE_DBG_32
//#define BF_DBG_32
@ -1219,7 +1221,7 @@ BF_EXPORT void BF_CALLTYPE Debugger_EvaluateContinueKeep()
debugger->EvaluateContinueKeep();
}
BF_EXPORT const char* BF_CALLTYPE Debugger_Evaluate(const char* expr, int callStackIdx, int cursorPos, int32 language, int8 expressionFlags)
BF_EXPORT StringView BF_CALLTYPE Debugger_Evaluate(const char* expr, int callStackIdx, int cursorPos, int32 language, int8 expressionFlags)
{
auto debugger = gDebugger;
@ -1238,7 +1240,7 @@ BF_EXPORT const char* BF_CALLTYPE Debugger_Evaluate(const char* expr, int callSt
BfLogDbg("Debugger_Evaluate Result=%s\n", outString.c_str());
}
#endif
return outString.c_str();
return outString;
}
BF_EXPORT const char* BF_CALLTYPE Debugger_EvaluateToAddress(const char* expr, int callStackIdx, int cursorPos)

View file

@ -5455,7 +5455,7 @@ bool WinDebugger::ParseFormatInfo(DbgModule* dbgModule, const StringImpl& format
DbgEvaluationContext dbgEvaluationContext(this, dbgModule, countExpr, formatInfo);
DbgTypedValue countValue = dbgEvaluationContext.EvaluateInContext(contextTypedValue);
if ((countValue) && (countValue.mType->IsInteger()))
formatInfo->mOverrideCount = (intptr)countValue.GetInt64();
formatInfo->mMaxCount = (intptr)countValue.GetInt64();
if (dbgEvaluationContext.HadError())
{
if (errorString != NULL)