mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -05:00
Attempt to fix overlapping output problem
This commit is contained in:
parent
3805df1ee8
commit
0276f523ff
@ -55,6 +55,7 @@ DAAP_BLOCK *daap_get_new(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pnew->free=0;
|
||||
pnew->value=NULL;
|
||||
pnew->parent=NULL;
|
||||
pnew->children=NULL;
|
||||
@ -86,7 +87,7 @@ DAAP_BLOCK *daap_add_formatted(DAAP_BLOCK *parent, char *tag,
|
||||
pnew->size=size;
|
||||
memcpy(pnew->tag,tag,4);
|
||||
|
||||
if((size <= 4) && (size > 0)) { /* we can just put it in svalue */
|
||||
if((size <= 4) && (size >= 0)) { /* we can just put it in svalue */
|
||||
memcpy(pnew->svalue,value,size);
|
||||
pnew->free=0;
|
||||
} else {
|
||||
@ -275,6 +276,8 @@ int daap_serialmem(DAAP_BLOCK *root, char *where) {
|
||||
if(daap_serialmem(root->children,where))
|
||||
return -1;
|
||||
|
||||
where += root->reported_size;
|
||||
|
||||
if(daap_serialmem(root->next,where))
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user