diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-10-11 00:18:08 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-10-11 00:18:08 +0200 |
commit | f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98 (patch) | |
tree | be72177b9fd7d8837042b4397a79ffc83fb89bdd /src/skel/crossplatform.cpp | |
parent | bug fix (diff) | |
parent | Merge pull request #745 from Tatsh/vscode (diff) | |
download | re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.gz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.bz2 re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.lz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.xz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.zst re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.zip |
Diffstat (limited to '')
-rw-r--r-- | src/skel/crossplatform.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp index 6188992d..452ad9fa 100644 --- a/src/skel/crossplatform.cpp +++ b/src/skel/crossplatform.cpp @@ -84,6 +84,16 @@ void FileTimeToSystemTime(time_t* writeTime, SYSTEMTIME* out) { } #endif +// Because wchar length differs between platforms. +wchar* +AllocUnicode(const char* src) +{ + wchar *dst = (wchar*)malloc(strlen(src)*2 + 2); + wchar *i = dst; + while((*i++ = (unsigned char)*src++) != '\0'); + return dst; +} + // Funcs/features from Windows that we need on other platforms #ifndef _WIN32 char *strupr(char *s) { |