summaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 90f3d2317..465437aa6 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -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);