Skip to content

Commit

Permalink
Fixed implementation of VariableDeclarationExpression::loadNativeFunc…
Browse files Browse the repository at this point in the history
…tion() for Windows target.
  • Loading branch information
nthnn committed Dec 13, 2024
1 parent 5d26dc8 commit 5cbb627
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 @@ -92,10 +92,11 @@ NativeFunction VariableDeclarationExpression::loadNativeFunction(

std::string parentPathFolder = parentFolder.string();
const char* parentPathStr = parentPathFolder.c_str();
PWSTR searchPath = new wchar_t[MultiByteToWideChar(
int size = MultiByteToWideChar(
CP_UTF8, 0, parentPathStr, -1, NULL, 0
)];
);

PWSTR searchPath = new wchar_t[(size_t) size];
if(searchPath)
MultiByteToWideChar(
CP_UTF8, 0,
Expand Down

0 comments on commit 5cbb627

Please sign in to comment.