summaryrefslogtreecommitdiff
path: root/super-ddf.c
diff options
context:
space:
mode:
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 1cb0a9fe..428e8f3b 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1301,8 +1301,13 @@ static const char *guid_str(const char *guid)
static char buf[DDF_GUID_LEN*2+1];
int i;
char *p = buf;
- for (i = 0; i < DDF_GUID_LEN; i++)
- p += sprintf(p, "%02x", (unsigned char)guid[i]);
+ for (i = 0; i < DDF_GUID_LEN; i++) {
+ unsigned char c = guid[i];
+ if (c >= 32 && c < 127)
+ p += sprintf(p, "%c", c);
+ else
+ p += sprintf(p, "%02x", c);
+ }
*p = '\0';
return (const char *) buf;
}