From 1f101bcb3952ce79440d0236313f3ed11cba2aaa Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 30 Jun 2007 01:31:54 +0000 Subject: Cleanups, fix crashes. --- hardinfo2/expr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'hardinfo2/expr.c') 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); -- cgit v1.2.3