Commit 71bdc41758250a4998eca6cc07a7aa9473b802ea
Handle return value of init_pair in color_manager
Author: xaizek
Author date (UTC): 2018-11-11 10:39
Committer name: xaizek
Committer date (UTC): 2018-11-11 10:39
Parent(s): 559b2fae96d1917c67b700b8c8f356f629a602d7
Signing key: 99DC5E4DB05F6BE2
Tree: 75043e1ec9ca96e3cb5d4365c7578de0739c5726
File src/ui/color_manager.c changed (mode: 100644) (index 6ef6ecc26..fcf61dc5b) |
... |
... |
allocate_pair(int fg, int bg) |
134 |
134 |
} |
} |
135 |
135 |
} |
} |
136 |
136 |
|
|
137 |
|
conf.init_pair(used_pairs, fg, bg); |
|
|
137 |
|
if(conf.init_pair(used_pairs, fg, bg) != 0) |
|
138 |
|
{ |
|
139 |
|
return -1; |
|
140 |
|
} |
138 |
141 |
|
|
139 |
142 |
--avail_pairs; |
--avail_pairs; |
140 |
143 |
return used_pairs++; |
return used_pairs++; |