mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix misuse of FALSE for null pointer return values.
x11_char_struct returns a pointer or NULL, so while returning FALSE would have ended up doing the right thing after macro expansion and integer->pointer conversion, it wasn't actually how I _meant_ to spell a failure return.
This commit is contained in:
parent
23e98b0afb
commit
1d459fc725
@ -388,13 +388,13 @@ static const XCharStruct *x11_char_struct(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (byte2 < xfs->min_char_or_byte2 || byte2 > xfs->max_char_or_byte2)
|
if (byte2 < xfs->min_char_or_byte2 || byte2 > xfs->max_char_or_byte2)
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
if (xfs->min_byte1 == 0 && xfs->max_byte1 == 0) {
|
if (xfs->min_byte1 == 0 && xfs->max_byte1 == 0) {
|
||||||
index = byte2 - xfs->min_char_or_byte2;
|
index = byte2 - xfs->min_char_or_byte2;
|
||||||
} else {
|
} else {
|
||||||
if (byte1 < xfs->min_byte1 || byte1 > xfs->max_byte1)
|
if (byte1 < xfs->min_byte1 || byte1 > xfs->max_byte1)
|
||||||
return FALSE;
|
return NULL;
|
||||||
index = ((byte2 - xfs->min_char_or_byte2) +
|
index = ((byte2 - xfs->min_char_or_byte2) +
|
||||||
((byte1 - xfs->min_byte1) *
|
((byte1 - xfs->min_byte1) *
|
||||||
(xfs->max_char_or_byte2 - xfs->min_char_or_byte2 + 1)));
|
(xfs->max_char_or_byte2 - xfs->min_char_or_byte2 + 1)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user