Revert prot_hydra.c getlong function bitshifting
All checks were successful
Altlinux build / build-alt (push) Successful in 2m34s
Archlinux build / build-arch (push) Successful in 2m54s
Archlinux build / make-test (push) Successful in 57s
Debian build / build-ubuntu (push) Successful in 3m41s

This commit is contained in:
Alexey Khromov 2025-04-26 10:21:04 +03:00
parent 81b326ca45
commit 162a22f0a4

View File

@ -286,11 +286,11 @@ static char *hydra_putword(char *buf, int val)
static long hydra_getlong(const char *buf) static long hydra_getlong(const char *buf)
{ {
//return ( (unsigned long) ((unsigned char) buf[0]) ) return ( (uint32_t) ((uint8_t) buf[0]) )
// | ( (unsigned long) ((unsigned char) buf[1]) << 8 ) | ( (uint32_t) ((uint8_t) buf[1]) << 8 )
// | ( (unsigned long) ((unsigned char) buf[2]) << 16 ) | ( (uint32_t) ((uint8_t) buf[2]) << 16 )
// | ( (unsigned long) ((unsigned char) buf[3]) << 24 ); | ( (uint32_t) ((uint8_t) buf[3]) << 24 );
return ( buf[3]<<24 | buf[2]<<16 | buf[1]<<8 | buf[0]); //return ( buf[3]<<24 | buf[2]<<16 | buf[1]<<8 | buf[0]);
} }
static int hydra_getword(const char *buf) static int hydra_getword(const char *buf)