summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-12-10 21:12:22 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-12-10 21:12:22 -0800
commitb975bd233e7111d08d2068f7f93c26a56d674f26 (patch)
treeeb5a4513796635fd3ceac91279328bae5d0cd12a
parentf25fbcf517b51f1acbc00fc5f20e52ee5e58aac4 (diff)
parent913d68bbcd547918a5fa18a056290478dbeb8699 (diff)
downloadmruby-b975bd233e7111d08d2068f7f93c26a56d674f26.tar.gz
mruby-b975bd233e7111d08d2068f7f93c26a56d674f26.zip
Merge pull request #618 from iij/pr-generator-off-by-one
fix an off-by-one error in mrbgems generator.
-rw-r--r--mrbgems/generator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/generator.c b/mrbgems/generator.c
index 03c51f036..f5b1304fa 100644
--- a/mrbgems/generator.c
+++ b/mrbgems/generator.c
@@ -60,8 +60,9 @@ static char
* String which will be the replacement
*
*/
-static char
-*replace(const char *s, const char *old, const char *new)
+
+static char *
+replace(const char *s, const char *old, const char *new)
{
char *ret;
int i, count = 0;