summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-24 05:45:55 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-24 05:45:55 +0000
commit3a42901a8092933ed8d700812e919a994319ec44 (patch)
tree258acc63f73694fe2f90385ce6858f1d6e8dd5f4 /win32/win32.c
parent4ffb36163018fdc2b6045b63ab9d0ed460a9588d (diff)
* dln.c (dln_strerror): fix a bug that sometimes made null message on
win32 (Tietew <tietew@tietew.net>'s patch). * win32/win32.c (mystrerror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 27f425e005..52c361d27d 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1832,7 +1832,8 @@ mystrerror(int e)
if (e < 0 || e > sys_nerr) {
if (e < 0)
e = GetLastError();
- if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, &source, e, 0,
+ if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS, &source, e, 0,
buffer, 512, NULL) == 0) {
strcpy(buffer, "Unknown Error");
}