summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/if_perl.xs2
-rw-r--r--src/testdir/test_perl.vim7
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/if_perl.xs b/src/if_perl.xs
index 265564075..099d38677 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;
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim
index 03c5fa0d1..e24c04f7c 100644
--- a/src/testdir/test_perl.vim
+++ b/src/testdir/test_perl.vim
@@ -29,6 +29,13 @@ EOF
call assert_equal('abc/def/', getline('$'))
endfunc
+funct Test_VIM_Blob()
+ call assert_equal('0z', perleval('VIM::Blob("")'))
+ call assert_equal('0z31326162', perleval('VIM::Blob("12ab")'))
+ call assert_equal('0z00010203', perleval('VIM::Blob("\x00\x01\x02\x03")'))
+ call assert_equal('0z8081FEFF', perleval('VIM::Blob("\x80\x81\xfe\xff")'))
+endfunc
+
func Test_buffer_Delete()
new
call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
diff --git a/src/version.c b/src/version.c
index 8d22ca90e..850c27dcd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -780,6 +780,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 978,
+/**/
977,
/**/
976,