aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/winansi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/winansi.c b/win32/winansi.c
index 45bb8806c..faae44dac 100644
--- a/win32/winansi.c
+++ b/win32/winansi.c
@@ -751,13 +751,14 @@ static BOOL winansi_CharToOem(LPCSTR s, LPSTR d)
751 return winansi_CharToOemBuff(s, d, strlen(s)+1); 751 return winansi_CharToOemBuff(s, d, strlen(s)+1);
752} 752}
753 753
754#undef OemToCharBuff
754BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len) 755BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len)
755{ 756{
756 WCHAR *buf; 757 WCHAR *buf;
757 int i; 758 int i;
758 759
759 if (GetConsoleCP() != 858) 760 if (GetConsoleCP() != 858)
760 return OemToCharBuff(s, d, len); 761 return OemToCharBuffA(s, d, len);
761 762
762 if (!s || !d) 763 if (!s || !d)
763 return FALSE; 764 return FALSE;
@@ -779,6 +780,7 @@ BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len)
779# undef CharToOem 780# undef CharToOem
780# define CharToOemBuff winansi_CharToOemBuff 781# define CharToOemBuff winansi_CharToOemBuff
781# define CharToOem winansi_CharToOem 782# define CharToOem winansi_CharToOem
783# define OemToCharBuff winansi_OemToCharBuff
782#endif 784#endif
783 785
784static int ansi_emulate(const char *s, FILE *stream) 786static int ansi_emulate(const char *s, FILE *stream)