summaryrefslogtreecommitdiff
path: root/dmidecode.c
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2021-01-05 10:36:29 +0100
committerJean Delvare <jdelvare@suse.de>2021-01-05 10:36:29 +0100
commit1117390ccd9cea139638db6f460bb6de70e28f94 (patch)
tree92d703ba6d96dbbc2f6963546ac93731e5cdf0be /dmidecode.c
parent3c111e4f6134855580f20f8e01fee26eff455fff (diff)
downloaddmidecode-git-1117390ccd9cea139638db6f460bb6de70e28f94.tar.gz
dmidecode: Fix the condition error in ascii_filter
The normal printable ASCII range is 32 to 127 (not included), so fix the error in this if condition. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'dmidecode.c')
-rw-r--r--dmidecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmidecode.c b/dmidecode.c
index 27d5494..864a193 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -116,7 +116,7 @@ static void ascii_filter(char *bp, size_t len)
size_t i;
for (i = 0; i < len; i++)
- if (bp[i] < 32 || bp[i] == 127)
+ if (bp[i] < 32 || bp[i] >= 127)
bp[i] = '.';
}