Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
15944:3f73b6c0f10f | 15945:f0f8754e3bf5 |
---|---|
1568 CODE: | 1568 CODE: |
1569 s = SvPVbyte(sv, len); | 1569 s = SvPVbyte(sv, len); |
1570 newsv = newSVpv("0z", 2); | 1570 newsv = newSVpv("0z", 2); |
1571 for (i = 0; i < len; i++) | 1571 for (i = 0; i < len; i++) |
1572 { | 1572 { |
1573 sprintf(buf, "%02X", s[i]); | 1573 sprintf(buf, "%02X", (unsigned char)(s[i])); |
1574 sv_catpvn(newsv, buf, 2); | 1574 sv_catpvn(newsv, buf, 2); |
1575 } | 1575 } |
1576 RETVAL = newsv; | 1576 RETVAL = newsv; |
1577 OUTPUT: | 1577 OUTPUT: |
1578 RETVAL | 1578 RETVAL |