Skip to content

Commit

Permalink
sgr: check setlocale() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jul 2, 2020
1 parent 71bd8e3 commit d614056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/poc/rgb.c
Expand Up @@ -15,6 +15,7 @@ int main(void){
if(nc == NULL){
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
int y, x, dimy, dimx;
struct ncplane* n = notcurses_stdplane(nc);
ncplane_dim_yx(n, &dimy, &dimx);
Expand Down
4 changes: 3 additions & 1 deletion src/poc/sgr.c
Expand Up @@ -32,7 +32,9 @@ pivot_on(int pivot, int* sgrs, int sgrcount){

int main(int argc, char** argv){
(void)argc;
setlocale(LC_ALL, "");
if(!setlocale(LC_ALL, "")){
return EXIT_FAILURE;
}
const char* sgr;
if(setupterm(NULL, -1, NULL)){
fprintf(stderr, "Error initializing terminal\n");
Expand Down

0 comments on commit d614056

Please sign in to comment.