You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, thanks a lot for this neat utility, I use it every day on my work computer.
In certain scripts I make use of negative numbers to indicate a further decrease in the output value. Wob indicates them in red which fits this use case nicely.
Nevertheless, it seems that negative numbers are somehow offset? -1 displays a nearly empty bar and decreasing the input decreases the bar until -17 suddenly wraps around and displays a nearly full red bar (with -16 being an empty bar).
Decreasing the numbers further reduces the red bar intuitively but with and offset of 16.
I therefore wanted to ask, are negative numbers officially supported by wob? And if so, is this behavior known or might there be a bug hiding?
Thanks for the help.
EDIT:
I have just seen that input is assigned to an unsigned long:
(
)
So -1 just overflows and wraps around, wob handling it as (2^64 - 1) % 100 = 15
hence the offset I've observed.
For now I've just offset my script output as a workaround but I think it would be nice to have official negative numbers support, would you be open to it @francma ?
The text was updated successfully, but these errors were encountered:
Hi there, thanks a lot for this neat utility, I use it every day on my work computer.
In certain scripts I make use of negative numbers to indicate a further decrease in the output value. Wob indicates them in red which fits this use case nicely.
Nevertheless, it seems that negative numbers are somehow offset?
-1
displays a nearly empty bar and decreasing the input decreases the bar until-17
suddenly wraps around and displays a nearly full red bar (with -16 being an empty bar).Decreasing the numbers further reduces the red bar intuitively but with and offset of 16.
I therefore wanted to ask, are negative numbers officially supported by wob? And if so, is this behavior known or might there be a bug hiding?
Thanks for the help.
EDIT:
I have just seen that input is assigned to an
unsigned long
:(
wob/src/wob.c
Line 367 in 729e5c6
So -1 just overflows and wraps around, wob handling it as (2^64 - 1) % 100 = 15
hence the offset I've observed.
For now I've just offset my script output as a workaround but I think it would be nice to have official negative numbers support, would you be open to it @francma ?
The text was updated successfully, but these errors were encountered: