From 23f7019883d6a015c2674506ee4c88ace1e4385a Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 24 Feb 2024 16:57:23 +0100 Subject: [PATCH] defined why2_byte_format_length --- src/core/lib/utils/misc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/lib/utils/misc.c b/src/core/lib/utils/misc.c index 03e0762..1f0d637 100644 --- a/src/core/lib/utils/misc.c +++ b/src/core/lib/utils/misc.c @@ -465,4 +465,9 @@ char *why2_replace(char *string, char *old, char *new) //CODE FROM: https://www. result[i] = '\0'; 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 } \ No newline at end of file