]> git.wh0rd.org - ICEs.git/blame - 290097/test.i.0
more ices
[ICEs.git] / 290097 / test.i.0
CommitLineData
81f80d8c
MF
1typedef unsigned char u8;
2typedef unsigned short u16;
3
4struct s {
5 u8 anchor[5];
6 u16 table_length;
7};
8
9void some_function(int x);
10
11void other_function(const struct s *pointer)
12{
13 u8 checksum = 0;
14 const u8 *ptr = (const u8 *)(pointer);
15
16 for (unsigned int i = 0; i < sizeof(*pointer); ++i)
17 checksum = (checksum + ptr[i]) & 0xFF;
18
19 some_function((int)checksum);
20}