aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2017-08-09 01:49:56 -0700
committerLeandro Pereira <leandro@hardinfo.org>2017-08-09 02:09:11 -0700
commitd41a3e1fdb33eda0977e0fc64faa2caddf07e443 (patch)
tree5caeaa7c4282bbc8b90c3cc625ffaa8886d7e7a7 /modules
parentb6c80356c72ce1dfce688a99d36db2ea47a744d8 (diff)
Fix off-by-one error when detecting physical machine type
Diffstat (limited to 'modules')
-rw-r--r--modules/computer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/computer.c b/modules/computer.c
index d0379b79..dd4961ec 100644
--- a/modules/computer.c
+++ b/modules/computer.c
@@ -326,7 +326,7 @@ static gchar *detect_machine_type(void)
};
int chassis_type = atoi(idle_free(chassis));
- if (chassis_type >= 0 && chassis_type <= G_N_ELEMENTS(types))
+ if (chassis_type >= 0 && chassis_type < G_N_ELEMENTS(types))
return g_strdup(_(types[chassis_type]));
}