mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[ncwidth] error-check printfs #2691
This commit is contained in:
parent
040ff99fb7
commit
09f7b717ac
@ -28,12 +28,18 @@ defaultout(void){
|
||||
for(int i = 0 ; i < 128 ; ++i){
|
||||
wint_t w = i;
|
||||
int width = wcwidth(w);
|
||||
printf("0x%02x: %d%c\t", w, width, width < 0 ? '!' : ' ');
|
||||
if(printf("0x%02x: %d%c\t", w, width, width < 0 ? '!' : ' ') < 0){
|
||||
return -1;
|
||||
}
|
||||
if(i % 4 == 3){
|
||||
printf("\n");
|
||||
if(printf("\n") < 0){
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
if(printf("\n") < 0){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user