mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge branch 'uemis-downloader-fixes'
This commit is contained in:
commit
cfaa494452
1 changed files with 3 additions and 3 deletions
|
@ -388,7 +388,7 @@ static void buffer_insert(char **buffer, int *buffer_size, char *buf)
|
|||
int obj_dive;
|
||||
int obj_log;
|
||||
int offset, len;
|
||||
uint8_t hdr[24];
|
||||
uint8_t hdr[27];
|
||||
|
||||
/* since we want to insert into the buffer... if there's
|
||||
* nothing there, this makes absolutely no sense so just
|
||||
|
@ -414,14 +414,14 @@ static void buffer_insert(char **buffer, int *buffer_size, char *buf)
|
|||
* some info from that in order to make sense of the data in
|
||||
* the dive info */
|
||||
b64 = strstr(ptr, "<bin>") + 5;
|
||||
decode(b64, hdr, 32);
|
||||
decode(b64, hdr, 36);
|
||||
cbuf = convert_dive_details(buf, hdr);
|
||||
offset = ptr - *buffer;
|
||||
len = strlen(cbuf);
|
||||
*buffer_size += len;
|
||||
*buffer = realloc(*buffer, *buffer_size);
|
||||
ptr = *buffer + offset;
|
||||
memmove(ptr + len, ptr, strlen(*buffer) - offset);
|
||||
memmove(ptr + len, ptr, strlen(*buffer) - offset + 1);
|
||||
memmove(ptr, cbuf, len);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue