• Jim Brown IV's avatar
    tload: fix lockup · 2f975ba4
    Jim Brown IV authored
    It looks like an off by one error was added to tload a couple years
    ago while removing goto statements.  This causes tload to go into
    an endless loop when the load is just under a scale change integer.
    eg: .99, 1.99, 3.99, 7.99
    
    to reproduce you can add, just under the loadavg at line 170 in tload.c:
    av[0] = 1.99;
    
    or get the load to that level separately.
    
    The patch below makes the code more like the original, but without the
    goto statements.  This can also be fixed by just changing line 183 in
    tload.c from "if (0 < row)" -> "if (0 <= row)".
    2f975ba4
tload.c 5.05 KB