Fix pg state formatting in ls-pgs

This commit is contained in:
Vitaliy Filippov
2025-03-17 01:37:58 +03:00
parent b7636e595f
commit b8f19e85ad
+2 -2
View File
@@ -104,7 +104,7 @@ resume_1:
{ {
if (pg_state_names[i] == bit) if (pg_state_names[i] == bit)
{ {
mask |= (uint64_t)1 << i; mask |= pg_state_bits[i];
found = true; found = true;
break; break;
} }
@@ -173,7 +173,7 @@ resume_1:
json11::Json::array state_names; json11::Json::array state_names;
for (int i = 0; i < pg_state_bit_count; i++) for (int i = 0; i < pg_state_bit_count; i++)
{ {
if (pgp.second.cur_state & (1 << i)) if (pgp.second.cur_state & pg_state_bits[i])
{ {
state_names.push_back(std::string(pg_state_names[i])); state_names.push_back(std::string(pg_state_names[i]));
} }