aboutsummaryrefslogtreecommitdiffstats
path: root/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index 22c8c12d1c..90b1168d63 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -13,6 +13,7 @@
**********************************************************************/
#include "ruby.h"
+#include "re.h"
#include <ctype.h>
#include <math.h>
#include <stdarg.h>
@@ -428,6 +429,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
len = prec;
}
}
+ /* need to adjust multi-byte string pos */
if (flags&FWIDTH) {
if (width > len) {
CHECK(width);