Commit cd40797a authored by Dean Camera's avatar Dean Camera
Browse files

Fixed possible rounding in the VERSION_BCD() macros for some 0.01 step...

Fixed possible rounding in the VERSION_BCD() macros for some 0.01 step increments (thanks to Oliver Zander).
parent 6936fcbd
......@@ -29,6 +29,7 @@
* - Fixed missing Win-32bit compatibility sections in the LUFA INF driver files (thanks to Christan Beharrell)
* - Fixed logic hole breaking USB operations on a USB controller with only one supported USB mode and no USB_DEVICE_ONLY or USB_HOST_ONLY
* configuration token set
* - Fixed possible rounding in the VERSION_BCD() macros for some 0.01 step increments (thanks to Oliver Zander)
* - Library Applications:
* - Fixed broken RESET_TOGGLES_LIBUSB_COMPAT compile time option in the AVRISP-MKII project
* - Fixed incompatibility in the CDC class bootloader on some systems (thanks to Sylvain Munaut)
......
......@@ -724,8 +724,8 @@
/* Macros: */
#define VERSION_TENS(x) (int)((int)(x) / 10)
#define VERSION_ONES(x) (int)((int)(x) % 10)
#define VERSION_TENTHS(x) (int)(((x * 1) - ((int)(x * 1))) * 10)
#define VERSION_HUNDREDTHS(x) (int)(((x * 10) - ((int)(x * 10))) * 10)
#define VERSION_TENTHS(x) (int)((x - (int)x) * 10)
#define VERSION_HUNDREDTHS(x) (int)((x * 100) - ((int)(x * 10) * 10))
#endif
/* Disable C linkage for C++ Compilers: */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment