fix pl-tai
This commit is contained in:
16
packages/PLStream/libtai/tai_unpack.c
Normal file
16
packages/PLStream/libtai/tai_unpack.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "tai.h"
|
||||
|
||||
void tai_unpack(char *s, struct tai *t)
|
||||
{
|
||||
uint64_t x;
|
||||
|
||||
x = (unsigned char) s[0];
|
||||
x <<= 8; x += (unsigned char) s[1];
|
||||
x <<= 8; x += (unsigned char) s[2];
|
||||
x <<= 8; x += (unsigned char) s[3];
|
||||
x <<= 8; x += (unsigned char) s[4];
|
||||
x <<= 8; x += (unsigned char) s[5];
|
||||
x <<= 8; x += (unsigned char) s[6];
|
||||
x <<= 8; x += (unsigned char) s[7];
|
||||
t->x = x;
|
||||
}
|
Reference in New Issue
Block a user