fix empty std::string case, reported by Daniel Moore
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9079 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a2b1dd53be
commit
f4f56b2c34
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ SWIG_From_dec(String)(const String& s)
|
|||
if (s.size()) {
|
||||
return SWIG_FromCharPtrAndSize(s.data(), s.size());
|
||||
} else {
|
||||
return SWIG_FromCharPtrAndSize("", 1);
|
||||
return SWIG_FromCharPtrAndSize(s.c_str(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue