diff options
| author | Quentin Carbonneaux <[email protected]> | 2024-04-07 22:09:32 +0200 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2024-04-07 22:18:01 +0200 |
| commit | a2ad38086c565419da9ebf4055d83f34489e521d (patch) | |
| tree | 6975d4eca7a3bcfd828df2a889344514ee878d86 /all.h | |
| parent | dc3f7d7c4a7a5c74f2de1c1de051057050066393 (diff) | |
mcf's improved rsval()
It is semantically the same but
does not rely on implementation-
defined behavior.
Diffstat (limited to 'all.h')
| -rw-r--r-- | all.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -115,7 +115,7 @@ static inline int rtype(Ref r) static inline int rsval(Ref r) { - return (int32_t)((int64_t)r.val << 3) >> 3; + return ((int)r.val ^ 0x10000000) - 0x10000000; } enum CmpI { |
