C4droid加入中文符号导致的奇葩情况
c4droid吧
全部回复
仅看楼主
level 11
tgxx501 楼主
//bug--原因:中文符号占两字节,这段程序相当于在一个中文符号的右半边替换为英文符号,故导致崩溃。
//应尽量避免出现。
#include <stdio.h>
#include <conio.h>
int main(){
printf("6的\n");
gotoxy(3,1);
printf(" ");
}
2016年08月03日 23点08分 1
level 11
tgxx501 楼主
//简化版本
#include <stdio.h>
int main(){
printf("6的\e[1;3H ");
}
2016年08月03日 23点08分 2
level 11
tgxx501 楼主
linux原生gcc实测免疫该情况,不会崩溃,不过排版乱了。[睡觉]
2016年08月03日 23点08分 3
level 11
tgxx501 楼主
实测导出后的apk安装后也会闪退。[喷][胜利]
2016年08月03日 23点08分 4
怀疑是安卓系统自身问题。[冷]
2016年08月03日 23点08分
1