diff options
Diffstat (limited to 'Userland/Utilities/nproc.cpp')
-rw-r--r-- | Userland/Utilities/nproc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Utilities/nproc.cpp b/Userland/Utilities/nproc.cpp index 071344069d..588b112605 100644 --- a/Userland/Utilities/nproc.cpp +++ b/Userland/Utilities/nproc.cpp @@ -22,7 +22,8 @@ int main() return 1; } - auto json = JsonValue::from_string({ file->read_all() }); + auto buffer = file->read_all(); + auto json = JsonValue::from_string({ buffer }); auto cpuinfo_array = json.value().as_array(); outln("{}", cpuinfo_array.size()); |