X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1d547ebc5994e4e3837977812d8bb45cbdfa447..18dbea4d81abbd97235a1f6548a0710f1c589817:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 70493dbc12..ca7031528b 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2216,7 +2216,10 @@ public: { size_t inbuf = strlen(psz); if (buf) - m2w.Convert(psz,buf); + { + if (!m2w.Convert(psz,buf)) + return (size_t)-1; + } return inbuf; } @@ -2224,7 +2227,10 @@ public: { const size_t inbuf = wxWcslen(psz); if (buf) - w2m.Convert(psz,buf); + { + if (!w2m.Convert(psz,buf)) + return (size_t)-1; + } return inbuf; }