Skip to content

Commit

Permalink
Merge pull request #4 from vagetablechicken/fix-sscanf
Browse files Browse the repository at this point in the history
fix: sscanf mac ps flags use hex
  • Loading branch information
dl239 authored Dec 27, 2021
2 parents 4f69bc0 + 8831033 commit c94030a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bvar/default_variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static bool read_proc_status(ProcStat &stat) {
}
const std::string& result = oss.str();
if (sscanf(result.c_str(), "%d %d %d %d"
"%d %u %ld %ld",
"%d %x %ld %ld",
&stat.pid, &stat.ppid, &stat.pgrp, &stat.session,
&stat.tpgid, &stat.flags, &stat.priority, &stat.nice) != 8) {
PLOG(WARNING) << "Fail to sscanf";
Expand Down

0 comments on commit c94030a

Please sign in to comment.