diff options
-rwxr-xr-x | index.cpp | 16 | ||||
-rw-r--r-- | vkext_flex.c | 1 |
2 files changed, 13 insertions, 4 deletions
@@ -27,10 +27,18 @@ void flex(const FunctionCallbackInfo<Value>& args) { string typeString(*typeArg); string ctypeStringWindows1251 = utf2cp(typeString); - int sex = args[1]->NumberValue(); - int lang = args[4]->NumberValue(); - - char *result = do_flex(nameStringWindows1251.c_str(), nameStringWindows1251.length(), caseStringWindows1251.c_str(), caseStringWindows1251.length(), sex, ctypeStringWindows1251.c_str(), ctypeStringWindows1251.length(), lang); + int sex = (int)args[1]->NumberValue(); + int lang = (int)args[4]->NumberValue(); + + char *result = do_flex( + nameStringWindows1251.c_str(), + nameStringWindows1251.length(), + caseStringWindows1251.c_str(), + caseStringWindows1251.length(), + sex, + ctypeStringWindows1251.c_str(), + ctypeStringWindows1251.length(), + lang); string resultStringWindows1251(result); string resultString = cp2utf(resultStringWindows1251); diff --git a/vkext_flex.c b/vkext_flex.c index ade09c0..244ac37 100644 --- a/vkext_flex.c +++ b/vkext_flex.c @@ -23,6 +23,7 @@ */ #include <string.h> +#include <stdlib.h> #include <assert.h> #include "vkext_flex.h" #include "vkext_flex_auto.c" |