1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update Utils.cpp

This commit is contained in:
Sandu Liviu Catalin 2021-02-01 04:31:55 +02:00
parent 9e71bb8365
commit 97907db477

View File

@ -1,5 +1,6 @@
// ------------------------------------------------------------------------------------------------
#include "Library/Utils.hpp"
#include "Core/Utility.hpp"
// ------------------------------------------------------------------------------------------------
#include <cstdio>
@ -68,7 +69,7 @@ static SQInteger SqExtractIPv4(HSQUIRRELVM vm)
// Push the element index
sq_pushinteger(vm, i);
// Push the element value
sq_pushinteger(vm, std::clamp(blocks[i], 0U, 255U));
sq_pushinteger(vm, Clamp(blocks[i], 0U, 255U));
// Assign the element
const SQRESULT res = sq_set(vm, -3);
// See if the assignment failed