Skip to content
Snippets Groups Projects
Unverified Commit 67993d1f authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov Committed by GitHub
Browse files

Merge pull request #61 from cellframe/1.1-12-Win

strdup bug win
parents 0c2fba78 e2f19873
No related branches found
No related tags found
1 merge request!24Support 3689
......@@ -14,12 +14,12 @@
#include "dap_strfuncs.h"
#ifdef _WIN32
//char *strndup(char *str, int len) {
// char *buf = (char*)malloc(len + 1);
// memcpy(buf, str, len);
// buf[len] = 0;
// return buf;
//}
static inline char *strndup(char *str, int len) {
char *buf = (char*)malloc(len + 1);
memcpy(buf, str, len);
buf[len] = 0;
return buf;
}
#endif
#ifdef _WIN32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment