Skip to content

Commit

Permalink
fix -Wshift-negative-value
Browse files Browse the repository at this point in the history
rurban committed Dec 1, 2024
1 parent a0fdc8c commit 6f26346
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/potion.h
Original file line number Diff line number Diff line change
@@ -210,8 +210,8 @@ struct PNVtable;
/// Integer: 31bit/63bit shifted off the last 1 bit
/// or a PNDouble double.
///\see PN_NUM (int to obj), PN_INT (obj to int), PN_IS_INT (is num obj?)
#define PN_NUM(i) ((PN)((((long)(i))<<1) + PN_FINTEGER))
#define PN_INT(x) ((long)((long)(x))>>1)
#define PN_NUM(i) ((PN)((((unsigned long)(i))<<1) + PN_FINTEGER))
#define PN_INT(x) ((long)((unsigned long)(x))>>1)
#define PN_DBL(num) (PN_IS_INT(num) ? (double)PN_INT(num) : ((struct PNDouble *)num)->value)
typedef _PN (*PN_F)(Potion *, PN, PN, ...);
#define PN_PREC 16

0 comments on commit 6f26346

Please sign in to comment.