summaryrefslogtreecommitdiff
path: root/Lib/ruby/rubyerrors.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ruby/rubyerrors.swg')
-rw-r--r--Lib/ruby/rubyerrors.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ruby/rubyerrors.swg b/Lib/ruby/rubyerrors.swg
index 434544bc9..ad71d1d39 100644
--- a/Lib/ruby/rubyerrors.swg
+++ b/Lib/ruby/rubyerrors.swg
@@ -110,7 +110,7 @@ const char* Ruby_Format_TypeError( const char* msg,
}
str = rb_str_cat2( str, "Expected argument " );
- sprintf( buf, "%d of type ", argn-1 );
+ SWIG_snprintf( buf, sizeof( buf), "%d of type ", argn-1 );
str = rb_str_cat2( str, buf );
str = rb_str_cat2( str, type );
str = rb_str_cat2( str, ", but got " );