projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Various tweaks to Encode
[p5sagit/p5-mst-13.2.git]
/
ext
/
Encode
/
Encode.xs
diff --git
a/ext/Encode/Encode.xs
b/ext/Encode/Encode.xs
index
b42668b
..
2796316
100644
(file)
--- a/
ext/Encode/Encode.xs
+++ b/
ext/Encode/Encode.xs
@@
-193,8
+193,8
@@
encode_method(pTHX_ encode_t * enc, encpage_t * dir, SV * src,
}
}
ENCODE_SET_SRC:
- if (check & ~ENCODE_LEAVE_SRC){
- sdone = SvCUR(src) - (slen+sdone);
+ if (check && !(check & ENCODE_LEAVE_SRC)){
+ sdone = SvCUR(src) - (slen+sdone);
if (sdone) {
sv_setpvn(src, (char*)s+slen, sdone);
}