diff --git a/src/sys.cpp b/src/sys.cpp index af51137..c9024a9 100644 --- a/src/sys.cpp +++ b/src/sys.cpp @@ -32,8 +32,8 @@ void sys::getTimeDate(TimeDate* td) { void sys::getRam(Memory* mem) { static std::array buf; // file is longer but we only need first 128 chars utils::readFile("/proc/meminfo", buf); - mem->free = getVal("MemAvailable:", std::string_view(buf)); - mem->total = getVal("MemTotal:", std::string_view(buf)); // shouldn't really update this on each loop + mem->free = getVal("MemAvailable:", buf.data()); + mem->total = getVal("MemTotal:", buf.data()); // shouldn't really update this on each loop mem->used = mem->total - mem->free; }