update StdString code on std::string construct function.
This commit is contained in:
@@ -14,7 +14,7 @@ inline std::string to_std(const hgl::OSString &str)
|
|||||||
{
|
{
|
||||||
hgl::UTF8String u8_str=hgl::to_u8(str);
|
hgl::UTF8String u8_str=hgl::to_u8(str);
|
||||||
|
|
||||||
return std::string(u8_str.c_str());
|
return std::string(u8_str.c_str(),str.Length());
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline hgl::OSString std_to_os(const std::string &str)
|
inline hgl::OSString std_to_os(const std::string &str)
|
||||||
@@ -24,7 +24,7 @@ inline hgl::OSString std_to_os(const std::string &str)
|
|||||||
|
|
||||||
inline std::string to_std(const hgl::OSString &str)
|
inline std::string to_std(const hgl::OSString &str)
|
||||||
{
|
{
|
||||||
return std::string(str.c_str());
|
return std::string(str.c_str(),str.Length());
|
||||||
}
|
}
|
||||||
#endif//
|
#endif//
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user