fix a potential segfault inside SGDeviceModel::ParseFirmware

This commit is contained in:
Mamadou Babaei
2024-02-09 10:53:46 +01:00
parent 7cf7294823
commit 7770c939c3
3 changed files with 14 additions and 7 deletions
@@ -106,7 +106,6 @@
#include "SGInterop/SGIC_FSGTimedThumpCommandImpl.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_FVector.h"
#include "SGInterop/SGIC_int32_Ref.h"
#if PLATFORM_ANDROID
#include "SGInterop/SGIC_jclass.h"
@@ -1243,13 +1242,13 @@ void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(
void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware(
void* RawFirmware,
void* OutMainVersion,
void* OutSubVersion)
int32* OutMainVersion,
int32* OutSubVersion)
{
FSGDeviceModelImpl::ParseFirmware(
StaticCast<FSGIC_FString*>(RawFirmware)->String,
StaticCast<FSGIC_int32_Ref*>(OutMainVersion)->Ref,
StaticCast<FSGIC_int32_Ref*>(OutSubVersion)->Ref);
*OutMainVersion,
*OutSubVersion);
}
void SGCoreImpl_FSGDeviceModelImpl_ctor(
@@ -630,8 +630,8 @@ SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware(
void* RawFirmware,
void* OutMainVersion,
void* OutSubVersion);
int32* OutMainVersion,
int32* OutSubVersion);
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ctor(
void* OutDeviceModelImpl);