diff src/if_perl.xs @ 15945:f0f8754e3bf5 v8.1.0978

patch 8.1.0978: blob not tested with Perl commit https://github.com/vim/vim/commit/2472ae81dff8c30f5d63db8ad2c937deae8be646 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 23 15:04:17 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 23 Feb 2019 15:15:12 +0100
parents 7fad90423bd2
children d95296021f6e
line wrap: on
line diff
--- 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;