diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 11 | ||||
-rw-r--r-- | core/variant_call.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 573c362389..730f7cfa3b 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3629,13 +3629,14 @@ String String::percent_decode() const { CharString pe; - for(int i=0;i<length();i++) { - - uint8_t c=operator[](i); + CharString cs = utf8(); + for(int i=0;i<cs.length();i++) { + + uint8_t c = cs[i]; if (c=='%' && i<length()-2) { - uint8_t a = LOWERCASE(operator[](i+1)); - uint8_t b = LOWERCASE(operator[](i+2)); + uint8_t a = LOWERCASE(cs[i+1]); + uint8_t b = LOWERCASE(cs[i+2]); c=0; if (a>='0' && a<='9') diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f3bf8f9e47..01550a1593 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -595,6 +595,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_PTR0R(Image, get_data); VCALL_PTR3(Image, blit_rect); VCALL_PTR1R(Image, converted); + VCALL_PTR0(Image, fix_alpha_edges); VCALL_PTR0R( AABB, get_area ); VCALL_PTR0R( AABB, has_no_area ); @@ -1411,6 +1412,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(IMAGE, RAW_ARRAY, Image, get_data, varray()); ADDFUNC3(IMAGE, NIL, Image, blit_rect, IMAGE, "src", RECT2, "src_rect", VECTOR2, "dest", varray(0)); ADDFUNC1(IMAGE, IMAGE, Image, converted, INT, "format", varray(0)); + ADDFUNC0(IMAGE, NIL, Image, fix_alpha_edges, varray()); ADDFUNC0(_RID,INT,RID,get_id,varray()); |