зеркало из https://github.com/github/ruby.git
* util.c (mblen): fix overrun. [ruby-dev:22672]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
181a3a2af5
Коммит
b685848c66
|
@ -6,6 +6,8 @@ Thu Jan 29 23:11:57 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub (DLEXT2):
|
* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub (DLEXT2):
|
||||||
ditto.
|
ditto.
|
||||||
|
|
||||||
|
* util.c (mblen): fix overrun. [ruby-dev:22672]
|
||||||
|
|
||||||
Thu Jan 29 22:41:53 2004 Dave Thomas <dave@pragprog.com>
|
Thu Jan 29 22:41:53 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* lib/rdoc/generators/html_generator.rb: Allow 'link:' in Tidylinks.
|
* lib/rdoc/generators/html_generator.rb: Allow 'link:' in Tidylinks.
|
||||||
|
|
2
util.c
2
util.c
|
@ -296,6 +296,8 @@ mblen(const char *s, size_t n)
|
||||||
if (s) {
|
if (s) {
|
||||||
if (n == 0 || *s == 0)
|
if (n == 0 || *s == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
else if (!s[1])
|
||||||
|
return 1;
|
||||||
return dbcs_table[(unsigned char)*s] + 1;
|
return dbcs_table[(unsigned char)*s] + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче