Negative values speaking fix for some certain situations

This commit is contained in:
Igor B. Poretsky 2017-02-13 19:07:52 +03:00 committed by Solomon Peachy
parent 20798aaa1c
commit 3fffabf50d

View file

@ -61,7 +61,7 @@ enum {
/* make a "talkable" ID from number + unit /* make a "talkable" ID from number + unit
unit is upper 4 bits, number the remaining (in regular 2's complement) */ unit is upper 4 bits, number the remaining (in regular 2's complement) */
#define TALK_ID(n,u) (((long)(u))<<UNIT_SHIFT | ((n) & ~(-1L<<UNIT_SHIFT))) #define TALK_ID(n,u) (((long)(u))<<UNIT_SHIFT | ((n) & ~(-1L<<DECIMAL_SHIFT)))
/* make a "talkable" ID from a decimal number + unit, the decimal number /* make a "talkable" ID from a decimal number + unit, the decimal number
is represented like x*10^d where d is the number of decimal digits */ is represented like x*10^d where d is the number of decimal digits */