From d2a3fcaa63f1d942fcaafb205b806b37ad804090 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 14 Nov 2013 07:48:23 +0100 Subject: [PATCH] [DEV]correction of share position --- etk/UString.cpp | 6 +++--- etk/os/FSNode.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etk/UString.cpp b/etk/UString.cpp index b7aef10..cfe038c 100644 --- a/etk/UString.cpp +++ b/etk/UString.cpp @@ -410,7 +410,7 @@ std::string extract_line(const std::string& _obj, int32_t _pos) { } else if (stopPos >= _obj.size() ) { stopPos = _obj.size(); } - return std::string(_obj, startPos, stopPos); + return std::string(_obj, startPos, stopPos - startPos); } std::u32string extract_line(const std::u32string& _obj, int32_t _pos) { @@ -439,7 +439,7 @@ std::u32string extract_line(const std::u32string& _obj, int32_t _pos) { } else if (stopPos >= _obj.size() ) { stopPos = _obj.size(); } - return std::u32string(_obj, startPos, stopPos); + return std::u32string(_obj, startPos, stopPos - startPos); } std::vector string_split(const std::string& _input, char _val) { @@ -447,7 +447,7 @@ std::vector string_split(const std::string& _input, char _val) { size_t lastStartPos = 0; for(size_t iii=0; iii<_input.size(); iii++) { if (_input[iii]==_val) { - list.push_back(std::string(_input, lastStartPos, iii)); + list.push_back(std::string(_input, lastStartPos, iii - lastStartPos)); lastStartPos = iii+1; } } diff --git a/etk/os/FSNode.cpp b/etk/os/FSNode.cpp index 80a8db7..141c4e1 100644 --- a/etk/os/FSNode.cpp +++ b/etk/os/FSNode.cpp @@ -303,7 +303,7 @@ void etk::initDefaultFolder(const char* _applName) { #ifdef __TARGET_OS__MacOs baseFolderData += "/../../Resources/"; #else - baseFolderData += "/../../share"; + baseFolderData += "/../share"; baseFolderData += binaryName; baseFolderData += "/"; #endif