Skip to content

Commit

Permalink
Fix JSON codec in crash fixer (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
bamx23 committed Jul 9, 2024
1 parent f509b76 commit 45b2fce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/KSCrashRecording/KSCrashReportFixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ static int onIntegerElement(const char *const name, const int64_t value, void *c
return result;
}

static int onUnsignedIntegerElement(const char *const name, const uint64_t value, void *const userData)
{
FixupContext *context = (FixupContext *)userData;
return ksjson_addUIntegerElement(context->encodeContext, name, value);
}

static int onNullElement(const char *const name, void *const userData)
{
FixupContext *context = (FixupContext *)userData;
Expand Down Expand Up @@ -284,6 +290,7 @@ char *kscrf_fixupCrashReport(const char *crashReport)
.onEndData = onEndData,
.onFloatingPointElement = onFloatingPointElement,
.onIntegerElement = onIntegerElement,
.onUnsignedIntegerElement = onUnsignedIntegerElement,
.onNullElement = onNullElement,
.onStringElement = onStringElement,
};
Expand Down

0 comments on commit 45b2fce

Please sign in to comment.