summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/miscfuncs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r--winsup/cygwin/miscfuncs.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index d36a824af..dcbe7c1b8 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -312,7 +312,10 @@ sys_wcstombs (char *tgt, const WCHAR *src, int len)
int __stdcall
sys_mbstowcs (WCHAR *tgt, const char *src, int len)
{
- return MultiByteToWideChar (get_cp (), 0, src, -1, tgt, len);
+ int res = MultiByteToWideChar (get_cp (), 0, src, -1, tgt, len);
+ if (!res)
+ debug_printf ("MultiByteToWideChar %E");
+ return res;
}
extern "C" int