mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] Fix bug due to int32 overflow
Change-Id: If9760bd9082b7e3f8ebea04cef1df63bae39a2a6
This commit is contained in:
committed by
EmilieNumworks
parent
2ec4b6354d
commit
4e5b68b45d
@@ -304,6 +304,7 @@ TextArea::TextArea(Responder * parentResponder, char * textBuffer,
|
||||
m_contentView(textBuffer, textBufferSize, fontSize, textColor, backgroundColor),
|
||||
m_delegate(delegate)
|
||||
{
|
||||
assert(textBufferSize < INT_MAX/2);
|
||||
}
|
||||
|
||||
bool TextArea::TextArea::handleEvent(Ion::Events::Event event) {
|
||||
@@ -316,9 +317,9 @@ bool TextArea::TextArea::handleEvent(Ion::Events::Event event) {
|
||||
} else if (event == Ion::Events::Down) {
|
||||
m_contentView.moveCursorGeo(0, 1);
|
||||
} else if (event == Ion::Events::Origin) {
|
||||
m_contentView.moveCursorGeo(-INT_MAX, 0);
|
||||
m_contentView.moveCursorGeo(-INT_MAX/2, 0);
|
||||
} else if (event == Ion::Events::End) {
|
||||
m_contentView.moveCursorGeo(INT_MAX, 0);
|
||||
m_contentView.moveCursorGeo(INT_MAX/2, 0);
|
||||
} else if (event == Ion::Events::Backspace) {
|
||||
m_contentView.removeChar();
|
||||
} else if (event.hasText()) {
|
||||
|
||||
Reference in New Issue
Block a user