diff options
-rw-r--r-- | sci_gateway/cpp/sci_octave.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp index 377506a..1a23000 100644 --- a/sci_gateway/cpp/sci_octave.cpp +++ b/sci_gateway/cpp/sci_octave.cpp @@ -170,7 +170,7 @@ extern "C" for (j = 0; j < dims; j++) { // storing the key - inStruct[j].key = malloc(sizeof(keys[j]) + 1); + inStruct[j].key = malloc(sizeof(wchar_t) * (wcslen(keys[j]) + 1)); wcpcpy((wchar_t*) inStruct[j].key, keys[j]); struct_out = scilab_getStructMatrix2dData(env, in[i], keys[j], 0, 0); // Retrieving Curr Value |