From 5365da923940769737dd860f6748d353dabd012f Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 27 Jan 2026 17:33:55 +0100 Subject: [PATCH] dtoa_eng(): use MEG instead of M for "mega" (M is considered as "milli" by spice) --- src/editprop.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/editprop.c b/src/editprop.c index 774e0e4a..8448a706 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -604,7 +604,10 @@ char *dtoa_eng(double i, int precision) else { i *= 1e18; suffix = 'a';} if(suffix) { /* can not use my_snprintf() here due to indirect precision */ - n = sprintf(s, "%.*g%c", precision, i, suffix); + if(suffix == 'M') + n = sprintf(s, "%.*gMEG", precision, i); + else + n = sprintf(s, "%.*g%c", precision, i, suffix); } else { n = sprintf(s, "%.*g", precision, i); }