diff options
| author | megamage <none@none> | 2009-02-18 16:51:10 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-02-18 16:51:10 -0600 |
| commit | 8c7daebae902fc3b8fcd16113a89ea8d90d913f9 (patch) | |
| tree | 387b3a09fc08a73b1b4315b563709184f5c823c2 /src/shared | |
| parent | d0a3d03422ccf25b1b8c9ac4778189ed484ee930 (diff) | |
[7296] Fixed some GCC warnings. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/Util.cpp | 6 | ||||
| -rw-r--r-- | src/shared/revision_nr.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp index 36c41e5da48..767b65e441c 100644 --- a/src/shared/Util.cpp +++ b/src/shared/Util.cpp @@ -254,8 +254,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize) size_t len = utf8::distance(utf8str,utf8str+csize); if(len > wsize) { + if(wsize > 0) + wstr[0] = L'\0'; wsize = 0; - wstr = L""; return false; } @@ -265,8 +266,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize) } catch(std::exception) { + if(wsize > 0) + wstr[0] = L'\0'; wsize = 0; - wstr = L""; return false; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index caca4e0642d..6e70795b567 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7295" + #define REVISION_NR "7296" #endif // __REVISION_NR_H__ |
