summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-18 06:27:53 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-18 06:27:53 +0000
commit8836a1d2654d7ee8eddc14065a1028b15d49b53f (patch)
treebc8ef1f5bfe6659d3698345124806cee215a49e1 /error.c
parent694059769211a571169e9e7b7707668981631548 (diff)
* error.c (rb_raise): workaround for some implementation of
vsnprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/error.c b/error.c
index 7befc7b8ee..e0c91f6746 100644
--- a/error.c
+++ b/error.c
@@ -595,6 +595,7 @@ rb_raise(exc, fmt, va_alist)
va_init_list(args,fmt);
vsnprintf(buf, BUFSIZ, fmt, args);
+ buf[BUFSIZ - 1] = '\0';
va_end(args);
rb_exc_raise(rb_exc_new2(exc, buf));
}