[ncwidth] error-check printfs #2691

pull/2696/head
nick black 1 year ago
parent 040ff99fb7
commit 09f7b717ac
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -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…
Cancel
Save