Fixes for value search

Signed-off-by: tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
tyrolyean 2020-04-29 02:06:56 +02:00
parent 646517cc97
commit 238d7d187c
No known key found for this signature in database
GPG Key ID: EDD105663B707C62
2 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,7 @@ struct email_t mail_from_text(char* message, size_t length){
mail.is_multipart = false;
return mail;
}else{
printf("Content Type set: %.*s",15, cont_type);
size_t value_length = 0;
char * mime_type = get_value_from_key(&value_length,
cont_type - mail.message, &mail);

View File

@ -85,6 +85,7 @@ char* get_value_from_key(size_t* val_len, size_t key_offset,
for(size_t i = key_offset; i < mail->header_len; i++){
if(mail->message[i] == ':'){
colon = i;
break;
}
}