defined why2_byte_format_length

This commit is contained in:
Václav Šmejkal 2024-02-24 16:57:23 +01:00
parent bf64d848c7
commit 23f7019883
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -466,3 +466,8 @@ char *why2_replace(char *string, char *old, char *new) //CODE FROM: https://www.
result[i] = '\0'; result[i] = '\0';
return result; return result;
} }
unsigned short why2_byte_format_length(char *s)
{
return (s[1] << 7) | s[0]; //ADD THE FIRST TWO INDEXES TOGETHER TO GET LENGTH
}