1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-03 01:31:55 +00:00

Merge pull request #2528 from lcvgit/cc65-checkversion-fix

checkversion.c fix missing shifts
This commit is contained in:
Bob Andrews 2024-11-07 20:52:38 +01:00 committed by GitHub
commit 394d3b1964
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,11 +10,11 @@
#include <stdio.h>
#include <stdlib.h>
#if ((__CC65__ & 0xff00) > 3) || ((__CC65__ & 0x000f) > 0)
#if ((__CC65__ >> 8) > 3) || ((__CC65__ & 0x000f) > 0)
/* compiler version is 2.19-git or higher */
# define VER_MAJOR ((__CC65__ >> 8) & 0xff)
# define VER_MINOR (__CC65__ & 0xff)
#elif ((__CC65__ & 0xff00) == 3)
#elif ((__CC65__ >> 8) == 3)
/* broken values in version 2.16 - 2.19-git before the bug was fixed */
# define VER_MAJOR 2
# define VER_MINOR (((__CC65__ >> 4) & 0x0f) + 16)