mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Initialize the string->length in init_dom_string()
This commit is contained in:
parent
1b71368459
commit
e34d0d3de4
@ -42,7 +42,11 @@ static inline struct dom_string *
|
||||
init_dom_string(struct dom_string *string, unsigned char *str, size_t len)
|
||||
{
|
||||
string->string = memacpy(str, len);
|
||||
return string->string ? string : NULL;
|
||||
if (!string->string)
|
||||
return NULL;
|
||||
|
||||
string->length = len;
|
||||
return string;
|
||||
}
|
||||
|
||||
#define is_dom_string_set(str) ((str)->string && (str)->length)
|
||||
|
Loading…
Reference in New Issue
Block a user