diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-24 05:45:55 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-24 05:45:55 +0000 |
commit | 460c894727298415196590234d31e00d99a1dee0 (patch) | |
tree | e051676025ff42bc47f7858abeb73734de5b771d /win32 | |
parent | 91866217e79574e43e130a462db25a81a976ef61 (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/branches/ruby_1_6@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index ce9265f924..125f1d54a2 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1794,7 +1794,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"); } |