Explorar o código

Fix incorrect ctype

Pascal Peridont %!s(int64=17) %!d(string=hai) anos
pai
achega
429088bf9d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      std/mtwin/mail/Part.hx

+ 4 - 1
std/mtwin/mail/Part.hx

@@ -361,7 +361,10 @@ class MetaPart<T> {
 		if( hctype != null ){
 			var t = hctype.value.split("/");
 			ctype0 = StringTools.trim(t[0]).toLowerCase();
-			ctype1 = StringTools.trim(t[1]).toLowerCase();
+			if( t.length > 1 )
+				ctype1 = StringTools.trim(t[1]).toLowerCase();
+			else
+				ctype1 = "";
 
 			if( hctype.params.exists("charset") ){
 				charset = hctype.params.get("charset");