aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/expr.c')
-rw-r--r--hardinfo2/expr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hardinfo2/expr.c b/hardinfo2/expr.c
index 2210a4e6..3f4707f5 100644
--- a/hardinfo2/expr.c
+++ b/hardinfo2/expr.c
@@ -168,12 +168,7 @@ GSList *math_string_to_infix(gchar *string)
} else if (strchr("-.1234567890", *expr)) {
gfloat value;
- sscanf(expr, "%f", &value);
-
- while (*expr && strchr(".1234567890", *expr))
- expr++;
- expr--;
-
+ expr += sscanf(expr, "%f", &value);
infix = g_slist_append(infix, new_value(value));
} else if (!isspace(*expr)) {
g_print("Invalid token: [%c][%d]\n", *expr, *expr);