From 46ab21dca9e3a19dac43c0327e2025f5886a1fb2 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 9 Apr 2017 20:19:35 +0200 Subject: [PATCH] inpcom.c, is_a_modelname(), don't accept "1E2" --- src/frontend/inpcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 1abc4f520..d4590f447 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1641,8 +1641,8 @@ is_a_modelname(const char *s) if (isalpha_c(s[0])) return TRUE; - /* e.g. 1N4002 */ - if (isdigit_c(s[0]) && isalpha_c(s[1]) && isdigit_c(s[2])) + /* e.g. 1N4002, but do not accept floats (for example 1E2) */ + if (isdigit_c(s[0]) && isalpha_c(s[1]) && isdigit_c(s[2]) && toupper_c(s[1]) != 'E') return TRUE; /* e.g. 2SK456 */