mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c (ole_hresult2msg): remove trailing
CR and LF. (doesn't depend on CR+LF) [ruby-dev:23694] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65e0e64656
commit
42f00af5e3
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jun 23 00:10:17 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (ole_hresult2msg): remove trailing
|
||||
CR and LF. (doesn't depend on CR+LF) [ruby-dev:23694]
|
||||
|
||||
Wed Jun 23 00:00:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (return_jump, break_jump): raise unexpceted local jump
|
||||
|
|
|
@ -501,9 +501,12 @@ ole_hresult2msg(hr)
|
|||
NULL, hr, LOCALE_SYSTEM_DEFAULT,
|
||||
(LPTSTR)&p_msg, 0, NULL);
|
||||
if (dwCount > 0) {
|
||||
term = strrchr(p_msg, '\r');
|
||||
if (term) {
|
||||
*term = '\0';
|
||||
term = p_msg + strlen(p_msg);
|
||||
while (p_msg < term) {
|
||||
term--;
|
||||
if (*term == '\r' || *term == '\n')
|
||||
*term = '\0';
|
||||
else break;
|
||||
}
|
||||
if (p_msg[0] != '\0') {
|
||||
rb_str_cat2(msg, p_msg);
|
||||
|
|
Loading…
Reference in a new issue