arm-linux-gcc char类型默认是unsigned char
哎,被坑了。
起因是代码移植,完全一样的代码在ipnone上和在android上运行结果大不相同。
其中,有类似这样的代码
static const char table[3] = {3,4-1};
unsigned int index = 一系列运算的结果;
int number = table[index];
if( number == -1 )
{
其他运算
原创
2013-12-04 13:32:51 ·
2452 阅读 ·
0 评论