From fdac8a1677de0e57b4f3305696f23e530ec1e3ef Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 6 Jul 2017 10:48:15 -0400 Subject: [PATCH] Fix KeyValues.SetUInt64 truncating value (#635). --- core/smn_keyvalues.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/smn_keyvalues.cpp b/core/smn_keyvalues.cpp index 34d1ce33..12e5239a 100644 --- a/core/smn_keyvalues.cpp +++ b/core/smn_keyvalues.cpp @@ -189,7 +189,7 @@ static cell_t smn_KvSetUInt64(IPluginContext *pCtx, const cell_t *params) pCtx->LocalToStringNULL(params[2], &key); pCtx->LocalToPhysAddr(params[3], &addr); - value = static_cast(*addr); + value = *reinterpret_cast(addr); pStk->pCurRoot.front()->SetUint64(key, value); return 1;