diff options
Diffstat (limited to 'src/lib/netlist/prg/nltool.cpp')
-rw-r--r-- | src/lib/netlist/prg/nltool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 5f25ac20219..20a37d24ff1 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -311,11 +311,14 @@ struct input_t : m_value(0.0) { std::array<char, 400> buf; // NOLINT(cppcoreguidelines-pro-type-member-init) - nl_fptype t(0); + double t(0); + double val(0); + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) - int e = std::sscanf(line.c_str(), "%lf,%[^,],%lf", &t, buf.data(), &m_value); + int e = std::sscanf(line.c_str(), "%lf,%[^,],%lf", &t, buf.data(), &val); if (e != 3) throw netlist::nl_exception(plib::pfmt("error {1} scanning line {2}\n")(e)(line)); + m_value = static_cast<nl_fptype>(val); m_time = netlist::netlist_time::from_double(t); m_param = setup.find_param(pstring(buf.data()), true); } |