diff options
Diffstat (limited to 'hcid/storage.c')
-rw-r--r-- | hcid/storage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/storage.c b/hcid/storage.c index f321ab35..805e35e0 100644 --- a/hcid/storage.c +++ b/hcid/storage.c @@ -121,7 +121,7 @@ int write_local_name(bdaddr_t *bdaddr, char *name) memset(str, 0, sizeof(str)); for (i = 0; i < 248 && name[i]; i++) - if (name[i] < 32 || name[i] == 127) + if ((unsigned char) name[i] < 32 || name[i] == 127) str[i] = '.'; else str[i] = name[i]; @@ -232,7 +232,7 @@ int write_device_name(bdaddr_t *local, bdaddr_t *peer, char *name) memset(str, 0, sizeof(str)); for (i = 0; i < 248 && name[i]; i++) - if (name[i] < 32 || name[i] == 127) + if ((unsigned char) name[i] < 32 || name[i] == 127) str[i] = '.'; else str[i] = name[i]; |