mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Don't store notes that are just one space on the Uemis
Sometimes the Uemis appears to return " " as notes instead of no notes. This patch filters this out (otherwise redownloading divecomputers can cause silly things like notes that say "(existing note) or ( )" ) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0233239198
commit
fd983a0992
1 changed files with 3 additions and 1 deletions
|
@ -109,7 +109,9 @@ static void uemis_get_index(char *buffer, int *idx)
|
|||
/* space separated */
|
||||
static void uemis_add_string(char *buffer, char **text)
|
||||
{
|
||||
if (!buffer || !*buffer)
|
||||
/* do nothing if this is an empty buffer (Uemis sometimes returns a single
|
||||
* space for empty buffers) */
|
||||
if (!buffer || !*buffer || (*buffer == ' ' && *(buffer + 1) == '\0'))
|
||||
return;
|
||||
if (!*text) {
|
||||
*text = strdup(buffer);
|
||||
|
|
Loading…
Reference in a new issue