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)
diff --git a/src/if_ruby.c b/src/if_ruby.c
index d3ed781..543ee8a 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -1267,7 +1267,7 @@
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;