OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8a4d91
)
Mac: add paranoia about big cursor extending beyond a terminal's bounds
author
Eric Branlund
<ebranlund@fastmail.com>
Tue, 25 Apr 2023 13:04:34 +0000
(07:04 -0600)
committer
Eric Branlund
<ebranlund@fastmail.com>
Tue, 25 Apr 2023 13:04:34 +0000
(07:04 -0600)
src/main-cocoa.m
patch
|
blob
|
history
diff --git
a/src/main-cocoa.m
b/src/main-cocoa.m
index
40d0d13
..
d2c75f5
100644
(file)
--- a/
src/main-cocoa.m
+++ b/
src/main-cocoa.m
@@
-4773,6
+4773,8
@@
static errr Term_curs_cocoa(int x, int y)
static errr Term_bigcurs_cocoa(int x, int y)
{
AngbandContext *angbandContext = (__bridge AngbandContext*) (Term->data);
+ /* Out of paranoia, coerce to remain in bounds. */
+ int w = (x + 2 <= angbandContext.cols) ? 2 : angbandContext.cols - x;
[angbandContext.contents setCursorAtColumn:x row:y width:2 height:1];
[angbandContext.changes markChangedBlockAtColumn:x row:y width:2 height:1];