Fix /proc/memory to return floats
This commit is contained in:
parent
0d6674b9b9
commit
b8df32111d
@ -23,7 +23,7 @@ bool memory::getProcMem(crow::json::wvalue& ret){
|
||||
final_space = i;
|
||||
}
|
||||
|
||||
ret[line.substr(0,colon)] = line.substr(last_space, final_space - last_space);
|
||||
ret[line.substr(0,colon)] = std::stof(line.substr(last_space, final_space - last_space));
|
||||
}
|
||||
} else {
|
||||
ret["message"] = "Failed to open proc filesystem";
|
||||
|
Loading…
Reference in New Issue
Block a user