mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0977: blob not tested with Ruby
Problem: Blob not tested with Ruby. Solution: Add more test coverage. fixes a crash. (Dominique Pelle, closes #4036)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user