summaryrefslogtreecommitdiffstats
path: root/src/if_ruby.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-23 14:23:03 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-23 14:23:03 +0100
commit0d13cce3453b2274c93c5015faa1993baaebace9 (patch)
tree5cf62aee4d8867db3bbba63795c3829aae1055f9 /src/if_ruby.c
parente4963c543ddcfc4845fa0d42893b6a4e1aa27c47 (diff)
patch 8.1.0977: blob not tested with Rubyv8.1.0977
Problem: Blob not tested with Ruby. Solution: Add more test coverage. fixes a crash. (Dominique Pelle, closes #4036)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r--src/if_ruby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index d3ed781281..543ee8ac27 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -1267,7 +1267,7 @@ static VALUE vim_blob(VALUE self UNUSED, VALUE str)
int i;
for (i = 0; i < RSTRING_LEN(str); i++)
{
- sprintf(buf, "%02X", RSTRING_PTR(str)[i]);
+ sprintf(buf, "%02X", (unsigned char)(RSTRING_PTR(str)[i]));
rb_str_concat(result, rb_str_new2(buf));
}
return result;