Skip to content

Commit

Permalink
Fixed Windows build with FARPROC error.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Dec 22, 2024
1 parent a2a9c44 commit 3e92c0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/n8/ast/expression/VariableDeclarationExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <n8/core/SymbolTable.hpp>
#include <n8/util/PathHelper.hpp>

#include <bit>
#include <filesystem>

#if defined(__unix__) || defined(__linux__) || defined(__APPLE__)
Expand Down Expand Up @@ -138,10 +139,10 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(

#elif defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)

auto func = (NativeFunction) GetProcAddress(
auto func = std::bit_cast<NativeFunction>(GetProcAddress(
(HMODULE) handle,
name.c_str()
);
));

#endif

Expand Down

0 comments on commit 3e92c0d

Please sign in to comment.