diff options
-rw-r--r-- | target-i386/cpuid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 9fc9769edd..0b3af9060c 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -711,7 +711,7 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) tsc_freq = strtosz_suffix_unit(val, &err, STRTOSZ_DEFSUFFIX_B, 1000); - if (!*val || *err) { + if (tsc_freq < 0 || *err) { fprintf(stderr, "bad numerical value %s\n", val); goto error; } |