Add command result flag for whether SetResultData was called

Use for tracerestrict validation result fail offset
This commit is contained in:
Jonathan G Rennison
2023-05-30 23:29:53 +01:00
parent 5dcbd9271b
commit 13183d3f13
4 changed files with 10 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ static void Load_TRRP()
char str[4096];
char *strend = str + seprintf(str, lastof(str), "Trace restrict program %d: %s\nProgram dump:",
index, GetStringPtr(validation_result.GetErrorMessage()));
uint fail_offset = validation_result.GetResultData() ^ (1 << 31);
uint fail_offset = validation_result.HasResultData() ? validation_result.GetResultData() : UINT32_MAX;
for (uint i = 0; i < (uint)prog->items.size(); i++) {
if ((i % 3) == 0) {
strend += seprintf(strend, lastof(str), "\n%4u:", i);