MenuField: Make sure input is a single byte
This commit is contained in:
@@ -430,6 +430,11 @@ BMenuField::MouseDown(BPoint where)
|
|||||||
void
|
void
|
||||||
BMenuField::KeyDown(const char* bytes, int32 numBytes)
|
BMenuField::KeyDown(const char* bytes, int32 numBytes)
|
||||||
{
|
{
|
||||||
|
if (numBytes != 1) {
|
||||||
|
BView::KeyDown(bytes, numBytes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (bytes[0]) {
|
switch (bytes[0]) {
|
||||||
case B_SPACE:
|
case B_SPACE:
|
||||||
case B_RIGHT_ARROW:
|
case B_RIGHT_ARROW:
|
||||||
|
|||||||
Reference in New Issue
Block a user