MHD_get_version(): fixed signed value bit shift

This commit is contained in:
Evgeny Grin (Karlson2k) committed 2022-04-18 11:18:04 +03:00
1 parent b0a2a0add1
commit f71019f00b
1 file changed
+4 -4
+4 -4
View File
@@ -7901,11 +7901,11 @@ MHD_get_version (void)
int res = MHD_snprintf_ (ver,
sizeof(ver),
"%x.%x.%x",
(((int) MHD_VERSION >> 24) & 0xFF),
(((int) MHD_VERSION >> 16) & 0xFF),
(((int) MHD_VERSION >> 8) & 0xFF));
(int) (((uint32_t) MHD_VERSION >> 24) & 0xFF),
(int) (((uint32_t) MHD_VERSION >> 16) & 0xFF),
(int) (((uint32_t) MHD_VERSION >> 8) & 0xFF));
if ((0 >= res) || (sizeof(ver) <= res))
return "0.0.0"; /* Can't return real version*/
return "0.0.0"; /* Can't return real version */
}
return ver;
#endif /* !PACKAGE_VERSION */