From 2472ae81dff8c30f5d63db8ad2c937deae8be646 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 23 Feb 2019 15:04:17 +0100 Subject: patch 8.1.0978: blob not tested with Perl Problem: Blob not tested with Perl. Solution: Add more test coverage. Fixes a crash. (Dominique Pelle, closes #4037) --- src/if_perl.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/if_perl.xs') diff --git a/src/if_perl.xs b/src/if_perl.xs index 2655640755..099d386776 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -1570,7 +1570,7 @@ Blob(SV* sv) newsv = newSVpv("0z", 2); for (i = 0; i < len; i++) { - sprintf(buf, "%02X", s[i]); + sprintf(buf, "%02X", (unsigned char)(s[i])); sv_catpvn(newsv, buf, 2); } RETVAL = newsv; -- cgit v1.2.3