diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index b3b54686..1158bb26 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -115,10 +115,10 @@ namespace nana{ namespace system{ #else str.reserve(size / sizeof(nana::char_t)); str.append(reinterpret_cast(res), reinterpret_cast(res) + size / sizeof(nana::char_t)); - nana::string::size_type pos = str.find_last_not_of(nana::char_t(0)); +#endif + auto pos = str.find_last_not_of(nana::char_t(0)); if(pos != str.npos) str.erase(pos + 1); -#endif #if defined(NANA_X11) ::XFree(res);