Skip to content

Commit

Permalink
fix stringlist bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sploving committed Aug 26, 2011
1 parent bf6e7e1 commit 1c36dfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interfaces/csharp_modular/swig_typemaps.i
Expand Up @@ -295,12 +295,12 @@ TYPEMAP_STRINGFEATURES(float64_t, double, double)
len = strlen(str);
max_len = shogun::CMath::max(len, max_len);

strings[i].slen = len + 1;
strings[i].slen = len;
strings[i].string = NULL;

if (len > 0) {
strings[i].string = SG_MALLOC(char, len + 1);
memcpy(strings[i].string, str, len + 1);
strings[i].string = SG_MALLOC(char, len);
memcpy(strings[i].string, str, len);
}
}

Expand Down

0 comments on commit 1c36dfa

Please sign in to comment.