mirror of https://github.com/xzeldon/htop.git
Fix a small undefined behavior detected by libubsan.
This commit is contained in:
parent
19f0f4db27
commit
fa1b5d1e2e
|
@ -394,7 +394,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
|
|||
int indent = (this->indent < 0 ? -this->indent : this->indent);
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
if (indent & (1 << i))
|
||||
if (indent & (1U << i))
|
||||
maxIndent = i+1;
|
||||
for (int i = 0; i < maxIndent - 1; i++) {
|
||||
int written;
|
||||
|
|
Loading…
Reference in New Issue