Skip to content

Commit 1ca2ddb

Browse files
committed
improve pointer_event_cast
1 parent 62b4411 commit 1ca2ddb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
2025/08/20
44
* 修复demouiold崩溃问题(感谢兆坤提供补丁)
55
* 修复list_view中的item使用self_layout时布局异常的问题(感谢俊杰提供补丁)
6+
* 完善 pointer_event_cast (感谢泽武提供补丁)
67

78
2025/08/17
89
* 修复 edit中可能存在的越界读取。

src/base/events.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ orientation_event_t* orientation_event_cast(event_t* event) {
8282

8383
pointer_event_t* pointer_event_cast(event_t* event) {
8484
return_value_if_fail(event != NULL, NULL);
85-
return_value_if_fail(event->type >= EVT_POINTER_DOWN && event->type <= EVT_CLICK, NULL);
85+
return_value_if_fail(event->type >= EVT_POINTER_DOWN && event->type <= EVT_DOUBLE_CLICK, NULL);
8686
return_value_if_fail(event->size == sizeof(pointer_event_t), NULL);
8787

8888
return (pointer_event_t*)event;

0 commit comments

Comments
 (0)