From 23139db8606573ef372baf4a45e9c2ac82d1af6f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 11 Aug 2024 19:19:56 -0400 Subject: [PATCH] must use different conversion to const char* to avoid garbage output --- tools/lammps-gui/chartviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lammps-gui/chartviewer.h b/tools/lammps-gui/chartviewer.h index 37a26c8b57..2f458304a4 100644 --- a/tools/lammps-gui/chartviewer.h +++ b/tools/lammps-gui/chartviewer.h @@ -90,7 +90,7 @@ public: int get_index() const { return index; }; int get_count() const { return series->count(); } - const char *get_title() const { return series->name().toLocal8Bit(); } + const char *get_title() const { return series->name().toStdString().c_str(); } double get_step(int index) const { return (index < 0) ? 0.0 : series->at(index).x(); } double get_data(int index) const { return (index < 0) ? 0.0 : series->at(index).y(); }